You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question: Date formatting in util.js/inspect #4314
The format of the return value may vary according to the platform. The most common return value is a RFC-1123 formatted date stamp, which is a slightly updated version of RFC-822 date stamps.
I am wondering why two different representations are used?
And being 2015, it would seem sensible to use toISOString
The toISOString() method returns a string in simplified extended ISO format (ISO 8601), which is always 24 characters long: YYYY-MM-DDTHH:mm:ss.sssZ. The timezone is always zero UTC offset, as denoted by the suffix "Z".
Anyway, I look forward to hearing the logic behind the decision and better my understanding.
Good question. That is rather wacky. Personally I'd prefer using the toISOString() but using either the toUTCString to toString methods consistently for both would be good. /cc @nodejs/ctc ... thoughts?
@Xotic750 ... interested in opening a PR with a possible fix that can be reviewed?
Activity
jasnell commentedon Dec 16, 2015
Good question. That is rather wacky. Personally I'd prefer using the
toISOString()but using either thetoUTCStringtotoStringmethods consistently for both would be good. /cc @nodejs/ctc ... thoughts?@Xotic750 ... interested in opening a PR with a possible fix that can be reviewed?
Xotic750 commentedon Dec 16, 2015
I think I could do that, I will go with
toISOStringfor review.indutny commentedon Dec 17, 2015
Landed in 04af258, thank you!
util,test: Use consistent Date representation for util/inspect
util: use consistent Dates in inspect()
util: use consistent Dates in inspect()