Issue 5913 in pharo: Remove Squeak epoch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5913 in pharo: Remove Squeak epoch

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug Milestone-2.0

New issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

2.0

As discussed at  
http://forum.world.st/Epoch-returns-local-offset-tp4630549p4630582.html ,  
the squeak epoch is vague and error-prone.

The Unix/Posix epoch however is well-defined and in wide use. Why don't we  
replace all uses of the Squeak epoch with the Unix epoch?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo
Issue 5913: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

This issue is no longer blocking issue 5910.
See http://code.google.com/p/pharo/issues/detail?id=5910
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo
In reply to this post by pharo
Updates:
        Status: FixReviewNeeded

Comment #1 on issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

Fix in inbox: Name: SLICE-Issue-5913-Remove-Squeak-epoch-SeanDeNigris.1

This was a complicated change that's obviously at the core of the system.  
Although all 385 of KernelTests-Chronology tests pass[1], I'd really  
appreciate some feedback and testing...

[1] except the DateAndTime*EpochTest classes, which should be removed; see  
below

General
* Update all comments referencing the Squeak Epoch
* There is a VM primitive that returns current seconds since the Squeak  
epoch. For now, I have adjusted all users of this primitive for the Unix  
epoch, but it would be cleaner to change the primitive and remove this hack

Kernel-Chronology
* Change SqueakEpoch from ChronologyConstants
        - rename to UnixEpoch
        - change value to that of UnixEpoch
* Replace all uses of SqueakEpoch with UnixEpoch
* change DateAndTime class>>epoch to use UTC

KernelTests-Chronology
* Fix all tests to pass, except the DateAndTime*EpochTest classes, which  
are incredibly redundant and should be removed (Issue 5910: [Cleanup]: Gut  
DateAndTimeDosEpochTests)
* Removed many magic numbers
* cleaned and refactored

Other
* Fix MailMessage and MessageList to use new epoch



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo

Comment #2 on issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

I forgot to mention:
* I checked the Julian dates with the calculator at  
http://www.nr.com/julian.html
* I used Norbert Hartl's DateAndTime class>>epoch from  
http://forum.world.st/Bug-in-DateAndTime-td2293749.html


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo

Comment #3 on issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

I had a quick look at the changes when merging in an up to date 2.0

The slice isn't clean (any more): it removes Character and many others  
thing, I don't understand.

The relevant changes seem OK.

One thing that worries me is that the Epoch instance is not cached, neither  
is differenceBetweenSqueakAndUnixEpochs. The result is that doing something  
like

   DateAndTime now

which certain systems could do very frequently, creates tons of garbage.  
This should be fast: get the system clock and create one object, not  
recompute differenceBetweenSqueakAndUnixEpochs by parsing strings, every  
time.

I also see a change in Delay, which is probably bogus due to the late  
merge, I don't know.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo

Comment #4 on issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

thanks sven
Sean could you have a look and may be produce a new version?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo

Comment #5 on issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

> Sean could you have a look and may be produce a new version?
I'd be happy to, but first... do we all agree that standardizing on the  
Unix Epoch is the way to go? The argument on the squeak list seemed to be:
- the squeak epoch has a certain beauty to it, being the turn of the century
vs
- why reinvent the wheel? Everybody already knows what the unix epoch is  
(e.g. you can point them to Wikipedia)

The full discussion is here:  
http://forum.world.st/Re-Pharo-project-Epoch-returns-local-offset-td4630581.html#a4630814

The main thing is to make sure that whatever we use is based on UTC and not  
local time.

So - two options
- PharoOffset := 1 January, 1901 UTC
- Unix offset

Also, whatever we change it to (and IMHO it really needs to be changed), I  
think existing live objects from previous Pharos (e.g. that are  
materialized with fuel) may be invalid (like the recent zip/mcz  
consequences)

I'm also posting the above comment for discussion at  
http://forum.world.st/who-can-have-a-look-at-Issue-5913-Remove-Squeak-epoch-td4634003.html


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo
Updates:
        Status: OnHold

Comment #6 on issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

This issue is pending a discussion on the mailing list [1]. I probably will  
want to do the fix again either way. And I've created a new issue [2] for  
the most pressing problem, which is the incorrect behavior.

I'm attaching a file out of tests (DateAndTimeTest, protocol 'test -  
epoch') showing the problems with the way the epoch is currently handled.

[1]  
http://forum.world.st/who-can-have-a-look-at-Issue-5913-Remove-Squeak-epoch-td4634003.html
[2] Issue 6089: [BUG]: Epoch handled incorrectly  
http://code.google.com/p/pharo/issues/detail?id=6089

Attachments:
        DateAndTimeTest-test - epoch.st  2.4 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5913 in pharo: Remove Squeak epoch

pharo
In reply to this post by pharo
Updates:
        Labels: -Milestone-2.0

Comment #8 on issue 5913 by [hidden email]: Remove Squeak epoch
http://code.google.com/p/pharo/issues/detail?id=5913

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker