SYNTAX

    date [options]


OPTIONS

-h (--help) bool

Display help.

-u (--universal) bool

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

-s (--set) string

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

-o (--utc-offset) int

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

-S (--secure) bool

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

-r (--raw) bool

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

-j (--just-display) bool

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 --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.

-R (--raw-set) int64

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

-t (--timestamp) bool

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

-Y (--y2k) bool

Only applicable with --raw and/or --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.


DESCRIPTION

Displays or sets the current time and date.

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


COPYRIGHT

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