W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2010

Re: Details of dateTime operations

From: Steve Harris <steve.harris@garlik.com>
Date: Fri, 3 Dec 2010 15:47:54 +0000
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <0B6320BF-958A-44C5-B1B5-5A03A76F68FC@garlik.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
On 2010-12-03, at 15:32, Andy Seaborne wrote:
> On 03/12/10 15:25, Steve Harris wrote:
>> On 2010-12-03, at 14:54, Andy Seaborne wrote:
>>> On 03/12/10 14:41, Steve Harris wrote:
>>>> On 2010-12-03, at 14:12, Andy Seaborne wrote:
>>>>> Easier (hopefully!)
>>>>>  Return an xsd:integer.
>>>>>  Return an xsd:decimal (fractional seconds possible).
>>>> Sounds good.
>>>> What about a NOW()? Returning an xsd:dateTime for the current time, in the Z timezone. e.g.
>>> I'm happy with that and I agree it's very useful.  It wasn't in the list we decided on so I haven't included it. It should return the same dateTime throughout the query execution.  c.f. fn:current-dateTime ("This function is ·stable·")
>> I'd be happy with CURRENT_DATETIME() too.
>> Stability is probably good.
>>> ARQ already has afn:now() - TZ is locale but of course you can run your locale in Z.
>> Many systems have one of each, c.f. time() and gmtime().
> It's the value that matters - it's just the presentation that needs a TZ.

Well, if you're CONSTRUCT/INSERTing it, you might care about the presentation form as well.

>> Strangely F&O doesn't specify the timezone used in fn:current-dateTime, the example is in zulu time, but it doesn't say that's the desired behaviour.
> """Returns the current dateTime (with timezone) from the dynamic context."""
> Every XQuery/XPath execution has a dynamic context that includes the default timezone from outside.
> SPARQL does not have this, which makes sense because data may come from one place and be queried in another, so no natural, safe default, while the XML case is more likely to be a collection of documents on the server.
>>> In the useful camp might be VERSION()->string (unless security concerns?)
>> Plain literal?
> Simple literal!

Or that :) [ though arguably "1.0.0"@zxx is the correct form ]

- Steve

Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Friday, 3 December 2010 15:48:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:02 UTC