Re: Details of dateTime operations

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!)
>>> 
>>> YEAR, MONTH, DAY, HOURS, MINUTES
>>>  Return an xsd:integer.
>>> SECONDS
>>>  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().

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.

> In the useful camp might be VERSION()->string (unless security concerns?)

Plain literal?

Advice from people who know their stuff is generally to turn version displaying features in Apache for e.g.

- 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:26:28 UTC