diff -r 000000000000 -r 7f656887cf89 core/builtins/date.cif --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/builtins/date.cif Wed Jun 23 15:52:26 2010 +0100 @@ -0,0 +1,83 @@ +# 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