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

RFC: 3.0 time locale configuration #402

Closed
thebigredgeek opened this issue Dec 26, 2016 · 2 comments
Closed

RFC: 3.0 time locale configuration #402

thebigredgeek opened this issue Dec 26, 2016 · 2 comments
Labels
discussion This issue is requesting comments and discussion

Comments

@thebigredgeek
Copy link
Contributor

discuss!

@fab1an
Copy link

fab1an commented Aug 5, 2017

Hi, i have come to this thread, because I noticed that time-stamps were off in my logs.

Speaking from many years of experience, I wouldn't use any built-in Date primitives.
The most sensible solution for doing anything date-related is using the java8-time API. There is a port for javascript https://js-joda.github.io/js-joda
(Yes, I've used moment in the past)

To prove my point, here is how js-joda does everything right without any configuration:

const {ZonedDateTime} = require("js-joda").use(require("js-joda-timezone"))
const debug = require("debug")("")
debug.useColors = false
debug("<--- NODE | JS-JODA --->   ", ZonedDateTime.now().toString())

Output:

Sat, 05 Aug 2017 06:48:28 GMT  <-- NODE | JS-JODA --> 2017-08-05T08:48:28.541+02:00[Europe/Vienna]

js-joda got the correct timezone for my system, which is everything I want for a logging-library.

@Qix-
Copy link
Member

Qix- commented Jun 20, 2018

Closing in favor of #582. Please move discussion there.

@Qix- Qix- closed this as completed Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is requesting comments and discussion
Development

No branches or pull requests

10 participants