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

2014-11-28 Thread T Lee Davidson
http://gambaswiki.org/wiki/lang/type/date says, Dates can be converted to numbers. Then the number returned is the number of days stored internally and the fraction of day represented by the number of microseconds. And ,there is a tip box that says: [[ tip As date are internally stored in UTC,

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

2014-11-28 Thread Benoît Minisini
Le 29/11/2014 00:57, T Lee Davidson a écrit : http://gambaswiki.org/wiki/lang/type/date says, Dates can be converted to numbers. Then the number returned is the number of days stored internally and the fraction of day represented by the number of microseconds. And ,there is a tip box that

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

2014-11-28 Thread T Lee Davidson
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,

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

2014-11-28 Thread Benoît Minisini
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 =

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

2014-11-28 Thread T Lee Davidson
On 11/28/2014 07:33 PM, Benoît Minisini wrote: 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.