tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florian Hockmann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TINKERPOP-1745) Gremlin .NET: Use DateTimeOffset instead of DateTime to represent g:Date
Date Wed, 09 Aug 2017 08:22:00 GMT

    [ https://issues.apache.org/jira/browse/TINKERPOP-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119562#comment-16119562

Florian Hockmann commented on TINKERPOP-1745:

I never used {{DateTimeOffset}}, but according to [this article from the documentation|https://docs.microsoft.com/en-us/dotnet/standard/datetime/choosing-between-datetime]
the main difference to {{DateTime}} is that it also includes an offset from UTC.
How would we get this offset when the GraphSON representation of {{g:Date}} looks like this?
  "@type" : "g:Date",
  "@value" : 1475583442552
Can we assume that the serialized values are always in UTC?

So my question is really only about the implementation. When we have a good solution then
I agree that {{DateTimeOffset}} should be the default in Gremlin.Net. That's also in line
with the recommendation in the linked article:
These uses for DateTimeOffset values are much more common than those for DateTime values.
As a result, DateTimeOffset should be considered the default date and time type for application

> Gremlin .NET: Use DateTimeOffset instead of DateTime to represent g:Date
> ------------------------------------------------------------------------
>                 Key: TINKERPOP-1745
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1745
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: language-variant
>            Reporter: Jorge Bay
> {{DateTimeOffset}} structure unambiguously identifies a single point in time, unlike
{{DateTime}} which contains calendar information.
> I think we should use {{DateTimeOffset}} for the default representation of g:Date.

This message was sent by Atlassian JIRA

View raw message