xojo.core.date.now timezone not current using current timezone on linux

Hello everyone!

I’m having an issue on one of my linux web apps where xojo.core.date.now is returning the time in GMT.

Is anyone able to confirm this is an issue or is it just me or my setup?

Thanks!

Tested on my local computer

dim dt as xojo.Core.Date = xojo.Core.Date.Now
Label1.Text = dt.ToText + " " + dt.TimeZone.Abbreviation

dt.ToText is GMT, dt.TimeZone.Abbreviation is my local timezone.

[quote=369726:@Asis Patisahusiwa]Tested on my local computer

dim dt as xojo.Core.Date = xojo.Core.Date.Now
Label1.Text = dt.ToText + " " + dt.TimeZone.Abbreviation
dt.ToText[/code] is GMT, [code]dt.TimeZone.Abbreviation

Interesting, I don’t see this behavior documented anywhere?

I think it’s a bug, you should report this.

Alright, thanks for confirming!

As an alternative you can use this JS code,

<script>
    var dt = new Date();
    alert(dt.toLocaleString());
</script>

[quote=369734:@Asis Patisahusiwa]As an alternative you can use this JS code,

[code]

[/code][/quote]

Thanks but I was using the date to write the time to a log file, I only noticed something was up when it was saying that it wrote to the log file 2 hours later than the current time.