mu-semtech / ember-mu-transform-helpers Goto Github PK
View Code? Open in Web Editor NEWEmber transform helpers for mu.semte.ch
License: MIT License
Ember transform helpers for mu.semte.ch
License: MIT License
In #6 I switched from using UTC dates to local dates because it fixed some issues. It turns out that it might have created others though ๐ , more specifically this potentially breaks UTC dates created in negative timezones.
For example, if you create a date instance like this:
new Date('2022-10-20')
the browser will assume the date is an UTC date.
From the MDN docs:
Date-only strings (e.g. "1970-01-01") are treated as UTC, while date-time strings (e.g. "1970-01-01T12:00") are treated as local.
The time will still be set to 0, but for the UTC time. So it will be something like this in Belgian time: 2022-10-20T02:00:00+02:00
. This will still serialize properly with the current implementation.
The problem is if you execute the code in a "negative" timezone. For example if you create the same UTC date in a -4 timezone it will serialize the previous date again: 2022-10-19T20:00:00-04:00
-> 2022-10-19
.
So this PR wasn't really correct either, but I'm not sure what the real solution is at this point. I'm not smart enough for timezones ๐ฌ.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.