Open micahgodbolt opened 8 years ago
Thinking about it more, it looks like Date(2015-12-17) assumes that we're talking December 17h, 00:00 UTC, and it is returning the local time.
So how can we change the function to use local time for input and output, or to add on the offset to the date before returning a value.
I had the same issue, did this ever get addressed? @micahgodbolt There's also metalsmith-jekyll-dates that seems to be working pretty well for me.
@cameronjroe i had to specify my timezone in order to get it to work
https://github.com/micahgodbolt/micahcodes/blob/master/metalsmith.js#L18
process.env.TZ = 'Pacific';
Ah, I see your comment. Okay, can one just specify that in the metadata? Maybe it should documented?
new Date(2015-12-17) returns
I had to specify
process.env.TZ = 'Pacific';
to get the output to actually be the 17th.I know this isn't really a "bug" in the module, but can the module be enhanced to detect timezone if it is not set?