Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong time reported #397

Closed
codebybrett opened this issue Feb 27, 2017 · 4 comments
Closed

Wrong time reported #397

codebybrett opened this issue Feb 27, 2017 · 4 comments
Assignees

Comments

@codebybrett
Copy link

codebybrett commented Feb 27, 2017

For a time of 5:17pm, NOW reports the time with a 1 hour difference:

>> now
== 27-Feb-2017/18:17:41+11:00

I built using Ubuntu 16.04 (virtualbox on windows). Builds with these OS_IDs exhibit the problem:

  • 0.4.2
  • 0.4.3
  • 0.4.4
  • 0.4.40

Building on windows for windows did not show this problem.

Running the tests for OS_ID=0.4.2 shows these two failures:

[0.6 == round/half-down/to 0.55001 0.1] "failed"
[-0.6 == round/half-down/to -0.55001 0.1] "failed"
@codebybrett codebybrett changed the title Wrong time reported for OS_ID=0.4.2 Wrong time reported Feb 27, 2017
@johnk-
Copy link

johnk- commented Feb 28, 2017

Seems to be working for me.

Tested ren-c built on 30-Aug-2016

>> now
== 28-Feb-2017/14:13:40+11:00

>> quit
$ date
Tue Feb 28 14:13:44 AEDT 2017

@hostilefork
Copy link
Member

Think I found the problem, if people can make sure it's still giving them the answer they expect for now/utc (compare with https://time.is/UTC) and now (compare with your computer's display clock)...

bd55c87

Note that because of how things work, your apparent "time zone" (the GMT-7 or GMT-8 or whatever) will be different dependent on whether you're in daylight savings time or not. Because Rebol stores times as the UTC value plus this offset as the zone, the zone has to change when daylight savings time changes, or the local time will be an hour off.

@draegtun
Copy link

draegtun commented Jun 22, 2017

I can confirm exact same problem when running on Ubuntu 16.04.2 (32-bit) on VMWare.

The fix above from @hostilefork has now corrected the problem.

@codebybrett - The rounding issue has already been logged #547 So looks like this confirms its a virtualisation issue! Is your Ubuntu 16.04 32 or 64 bit?

@codebybrett
Copy link
Author

codebybrett commented Jun 22, 2017

@hostilefork the fix resolves the time issue:

>> ; Time now.
>> now/utc     
== 22-Jun-2017/21:35:56
>> now         
== 23-Jun-2017/7:35:59+10:00
>> ; Change time to earlier daylight saving period.
>> now/utc                                  
== 22-Jan-2017/21:36:23
>> now                                      
== 23-Jan-2017/8:36:26+11:00

@draegtun Ubuntu 16.04 on 64 bit on VirtualBox Version 5.1.14 r112924 (Qt5.6.2) - But I'm not sure about virtualisation - will comment on this on #547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants