[Gambas-user] UTC conversion Tip for Date class doesn't work as expected

Benoît Minisini gambas at ...1...
Sat Nov 29 01:33:40 CET 2014


Le 29/11/2014 01:32, T Lee Davidson a écrit :
> On 11/28/2014 07:24 PM, Benoît Minisini wrote:
>>
>> You're right, the tip is false, i.e. it works only when System.TimeZone
>> < 0, otherwise you have a 24h error. It was written before
>> System.TimeZone exist.
>>
>> So you must do that instead:
>>
>> 	UTCDate = DateAdd(LocalDate, gb.Second, System.TimeZone)
>>
>> And the wiki must be fixed...
>
> I'd be glad to do that. But, would you like the Tip simply removed or
> modified re: "UTCDate = DateAdd(LocalDate, gb.Second, System.TimeZone)"?
>

Remove the tip, as it is false.

-- 
Benoît Minisini




More information about the User mailing list