-
Notifications
You must be signed in to change notification settings - Fork 22
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
Converting a Time (or DateTime) to seconds #85
Comments
Unfortunately, you have to open it up with the data constructor
and then divide it by a billion. I've personally stumbled across the need for timestamps with various precisions (typically millisecond precision) several times since writing this library, and I'm not aware of a good solution to this, at least not in a way that's compatible with chronos's API. |
Ok, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, @andrewthad, I'm using cryptographic APIs that need sometimes a timestamp in seconds. Reading the API reference of Chronos it's not obvious which function I should use to convert a time or datetime object to an integer that expresses the time in seconds (instead of nanoseconds).
Is this a situation where the Torsor package is useful?
The text was updated successfully, but these errors were encountered: