[Gambas-user] Daylight "saving" and time zones
jussi.lahtinen at gmail.com
Mon Oct 28 00:18:09 CET 2019
I found my answer. It's no. I just got this: "10/28/2019 02:04:23.316"
If I'm in Finland and say I have meeting tomorrow at 13:00 in London. The
assumption is that the 13:00 is time for meeting *in London*, independently
where and when I write down it to my calendar. When me and my device goes
to London the system clock is shifted so that my calendar is readable. Thus
13:00 is always correct despite of the time zone, independently where and
when it was written down.
On Mon, Oct 28, 2019 at 12:49 AM Benoît Minisini <g4mba5 at gmail.com> wrote:
> Le 27/10/2019 à 23:19, Jussi Lahtinen a écrit :
> > if I do this:
> > ? cstr(date.fromutc(date(2019,10,27,2,30)))
> > Is it guaranteed that in all possible localizations I will always get
> > 10/27/2019 02:30:00
> - date(2019,10,27,2,30) returns the date 2019-10-27T02:30:00 [local time]
> - Date.FromUTC() moves that date so that it becomes 2019-10-27T02:30:00
> [UTC] (it's "FromUTC" because the local representation of its date
> argument, i.e. what you pass to Date(), is assumed to be UTC).
> - CStr() converts a date to its UTC representation.
> I agree that Date() needs one more argument to define the timezone
> Benoît Minisini
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User