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

Use unix timestamp for inputTime and return value #73

Closed
philonor opened this issue Apr 13, 2016 · 3 comments
Closed

Use unix timestamp for inputTime and return value #73

philonor opened this issue Apr 13, 2016 · 3 comments

Comments

@philonor
Copy link

Problem

  • Return value (number of seconds) is "local time"
  • Turning number of seconds into usable representation (unix timestamp / moment.js) requires unnecessary effort (if timezone offset or DST has to be taken into account)

Possible solution
Always use a unix timestamp representation, both for specifying inputTime and also for return value.

Workaround
image

@blparker
Copy link

+1

@dts
Copy link
Contributor

dts commented Apr 27, 2016

I actually disagree, or think this should be optional. The headaches that this introduces from a timezone perspective alone is enough to complicate this library a great deal.

@rajeshwarpatlolla
Copy link
Owner

Users may or may not use the moment library. Even if they use moment library you can convert the returned epoch to the local timezone, and then you can easily convert it using moment methods.

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

4 participants