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

Date doesn't return the proper unix timestamp for asNumber #5

Open
richcollins opened this issue Oct 25, 2009 · 1 comment
Open

Date doesn't return the proper unix timestamp for asNumber #5

richcollins opened this issue Oct 25, 2009 · 1 comment

Comments

@richcollins
Copy link
Collaborator

asNumber should always return UTC seconds since 1970

Io> d := Date clone now
==> 2009-10-24 22:54:07 PDT
Io> d asNumber
==> 1256450047.2950639724731445
Io> d convertToUTC asNumber
==> 1256475247.2950630187988281
@richcollins
Copy link
Collaborator Author

Actually it appears that I should be using setToUTC. In either case, asString is broken as it doesn't account for the time zone.

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

1 participant