core/builtins/date.cif
author Tom Sutcliffe <thomas.sutcliffe@accenture.com>
Tue, 07 Dec 2010 17:29:09 +0000
changeset 90 ceac7084e2e5
parent 66 2a78c4ff2eab
permissions -rw-r--r--
Implemented RObjectIx-based memoryaccess APIs. Upshot is that objinfo now works again on platforms that define FSHELL_NO_DOBJECTIX_SUPPORT.

# date.cif
# 
# Copyright (c) 2010 Accenture. All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
# 
# Initial Contributors:
# Accenture - Initial contribution
#

==name date

==short-description

Displays or sets the current time and date.

==long-description

Example usage:

To get the current date and time:

    c:\>date
    07/04/2010 13:46:58.647500

To check how a human readable date is parsed:

    c:\>date --set --just-display "07/04/2010 13:47:00"
    07/04/2010 13:47:00.000000

To convert a raw TInt64 timestamp to a human-readable string:

    c:\>date --raw-set 1234567890 --display-only
    01/01/0000 00:20:34.567890

To set the current local time:

    c:\>date --set "07/04/2010 13:47:00"
    c:\>

To use a timestamp in a filename:

    date --timestamp | export -s TIMESTAMP
    do-something > C:\logs\myoutput-$TIMESTAMP.txt

==option bool u universal

Display or set universal time (UTC) rather than local time.

==option string s set

Sets the time and date. Format is that accepted by TTime::Parse(). For UK English localisations, C<DD/MM/YYYY HH:MM:SS> is one such acceptable format.

==option int o utc-offset

Sets the UTC offset in seconds. Must be used in conjunction with the C<--set> option.

==option bool S secure

Displays or sets the secure variant of the kernel's reckoning of time.

==option bool r raw

Displays the time and date as the number of microseconds since 0AD nominal Gregorian (Symbian OS's native time format).

==option bool j just-display

Rather than going ahead and setting the specified time and date, do a dry run and just displays it in human readable form. Must be used in conjunction with C<--set> or <--raw-set>. In effect it is an option to check that the set string has been parsed correctly before actually making the change.

==option int64 R raw-set

Sets the time and date from a number corresponding to the number of microseconds since 0AD nominal Gregorian (Symbian OS's native time format).

==option bool t timestamp

Display the date in timestamp format C<YYYYMMDD-HHMM.SS> suitable for use in a file name.

==option bool Y y2k

Only applicable with C<--raw> and/or C<--raw-set>. Instead of using 0AD as the epoc, assume 2000AD. Some APIs use 2000 instead of 0AD as the epoc so this option is occasionally useful for converting between the two.

==copyright

Copyright (c) 2006-2010 Accenture. All rights reserved.

==smoke-test

date $Quiet
date --raw $Quiet
date --timestamp $Quiet