Comments (2)
When an unqualified date, or date-time value is provided (i.e. one without an explicit Z or offset component), users expect the date to be interpreted as in their local timezone. This aligns with the ISO 8601 specification
https://en.wikipedia.org/wiki/ISO_8601#Local_time_(unqualified)Local time (unqualified)
If no UTC relation information is given with a time representation, the time is assumed to be in local time.
First, In the example you gave, there is no time representation, only a date representation. The value has no time zone at all and the snippet from ISO 8601 does not apply. (But as you mentioned, the bug report applies to date-times as well.)
Perhaps some users expect it to assume local time, but it's not what I, as a user, would expect. I would expect a date-time with no time-zone information to be assumed to be in UTC (if an assumption must be made at all). This is a data interchange format, not an interactive user interface. The interpretation of a value shouldn't change as the data crosses time zones. So I would expect it to assume UTC.
Furthermore, "assume local time" makes no sense when dealing with a service, as in the case of the model registry, because the "local time" would be the local time of some remote server. The server would not know the user's local time. I know that the model registry apparently runs with a "local time" of UTC, and so doesn't exhibit the buggy behavior, but in general the server should not be reinterpreting user timestamps according to its own local time zone. Whether this means Concerto should behave differently in client-side and server-side scenarios, I can't say, but my vote would be "no".
- Explicitly detect usage of date-times without a zone designation, and to assume an offset that matches the local offset of the user's machine/server.
- Use of the --utcOffset flag in the CLI should always allow the offset to be set explicitly.
I think a better solution is: 1) assume times are in UTC unless otherwise specified, 2) if you must normalize date-times, normalize them to UTC (or else leave their time zones alone), and 3) if you can, stop treating dates as date-times.
from concerto.
We now have an interim solution in 3.3 that allows clients to specify more strict behaviour. This is expected to become default behaviour in future.
from concerto.
Related Issues (20)
- Declaration validation uniqueness check is O(n^2)
- > We should make this consistent with what we are doing for other type references, e.g. TypeIdentifier for super class. What does that look like?
- Need a method to resolve type inference for decorators with type references HOT 17
- Throw error on validation of model with decorators with type reference if type not present HOT 5
- Support for References in Map values HOT 10
- Refactor declaration uniqueness check
- Performance updates for uniqueness checks
- Namespaces vulnerable to ReDoS HOT 1
- Fix breaking chnages coming up from lerna
- Create a linter for Concerto HOT 14
- Semantic Validation Rules
- Type Utility Functions (e.g. `Partial`,`Omit`) HOT 2
- Add error codes to property validation errors HOT 2
- Fix `no such file or directory error` inside in decoratormanager.js Test File
- Standardize/localize error messaging
- Make `accept` methods of introspection classes public HOT 1
- Factory doesn't generate empty entities HOT 1
- Make serializer option `strictQualifiedDateTimes` default behaviour
- Extends support for enum declarations HOT 3
- LocalDateTime
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concerto.