"Fossies" - the Fresh Open Source Software Archive

Member "dateutils-0.4.6/info/dateconv.texi" (19 Mar 2019, 4645 Bytes) of package /linux/privat/dateutils-0.4.6.tar.xz:


Caution: As a special service "Fossies" has tried to format the requested Texinfo source page into HTML format but that may be not always succeeeded perfectly. Alternatively you can here view or download the uninterpreted Texinfo source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the latest Fossies "Diffs" side-by-side code changes report for "dateconv.texi": 0.4.5_vs_0.4.6.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1 dateconv

dateconv may be invoked with the following command-line options:

Usage: dateconv [OPTION]... [DATE/TIME]...

Convert DATE/TIMEs between calendrical systems.
If DATE/TIME is omitted date/times are read from stdin.

DATE/TIME can also be one of the following specials
  - `now'           interpreted as the current (UTC) time stamp
  - `time'          the time part of the current (UTC) time stamp
  - `today'         the current date (according to UTC)
  - `tomo[rrow]'    tomorrow's date (according to UTC)
  - `y[ester]day'   yesterday's date (according to UTC)

  -h, --help            Print help and exit
  -V, --version         Print version and exit
  -q, --quiet           Suppress message about date/time and duration
                        parser errors and fix-ups.
                        The default is to print a warning or the
                        fixed up value and return error code 2.
  -f, --format=STRING   Output format.  This can either be a specifier
                        string (similar to strftime()'s FMT) or the name
                        of a calendar.
  -i, --input-format=STRING...
                        Input format, can be used multiple times.
                        Each date/time will be passed to the input
                        format parsers in the order they are given, if a
                        date/time can be read successfully with a given
                        input format specifier string, that value will
                        be used.
  -b, --base=DT         For underspecified input use DT as a fallback to
                        fill in missing fields.  Also used for ambiguous
                        format specifiers to position their range on the
                        absolute time line.
                        Must be a date/time in ISO8601 format.
                        If omitted defaults to the current date/time.
  -e, --backslash-escapes
                        Enable interpretation of backslash escapes in the
                        output and input format specifier strings.
  -S, --sed-mode        Copy parts from the input before and after a
                        matching date/time.
                        Note that all occurrences of date/times within a
                        line will be processed.
  -E, --empty-mode      Empty lines that cannot be parsed.
      --locale=LOCALE   Format results according to LOCALE, this would only
                        affect month and weekday names.
      --from-locale=LOCALE
                        Interpret dates on stdin or the command line as
                        coming from the locale LOCALE, this would only
                        affect month and weekday names as input formats
                        have to be specified explicitly.
      --from-zone=ZONE  Interpret dates on stdin or the command line as
                        coming from the time zone ZONE.
  -z, --zone=ZONE       Convert dates printed on stdout to time zone ZONE,
                        default: UTC.


Report bugs to https://github.com/hroptatyr/dateutils/issues

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 Examples

$ dateconv 2012-03-01
2012-03-01
$
$ dateconv -i "%d/%b/%y" 01/Mar/12
2012-03-01
$
$ dateconv -f "%d/%b/%y" 2012-03-01
01/Mar/12
$
$ dateconv -f "%d/%b/%y" -i "%OY %Om %Od" "MCMXCVIII IX XVII"
17/Sep/98
$
$ dateconv 12:03:01
12:03:01
$
$ dateconv -i "%I:%M:%S %p" "11:22:33 PM"
23:22:33
$
$ dateconv '2012-03-01 00:00:00'
2012-03-01T00:00:00
$
$ dateconv 2012-03-01T12:34:56
2012-03-01T12:34:56
$
$ dateconv --zone America/Chicago <<EOF
2012-03-01T07:05:06
2012-03-01T08:12:34
2012-03-11T01:05:06
2012-03-11T02:05:06
2012-03-11T07:05:06
2012-03-11T08:05:06
2012-03-11T17:05:06
EOF
2012-03-01T01:05:06
2012-03-01T02:12:34
2012-03-10T19:05:06
2012-03-10T20:05:06
2012-03-11T01:05:06
2012-03-11T03:05:06
2012-03-11T12:05:06
$
$ dateconv --from-zone America/Chicago <<EOF
2012-03-01T01:05:06
2012-03-01T02:12:34
2012-03-10T19:05:06
2012-03-10T20:05:06
2012-03-11T01:05:06
2012-03-11T03:05:06
2012-03-11T12:05:06
EOF
2012-03-01T07:05:06
2012-03-01T08:12:34
2012-03-11T01:05:06
2012-03-11T02:05:06
2012-03-11T07:05:06
2012-03-11T08:05:06
2012-03-11T17:05:06
$
$ dateconv --from-zone America/Chicago -z Europe/Berlin '2012-03-01 12:00' -i '%F %H:%M' -f '%F %T'
2012-03-01 19:00:00
$

[Top] [Contents] [Index] [ ? ]

About This Document

This document was generated on March 25, 2019 using texi2html.

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ << ] FastBack Beginning of this chapter or previous chapter 1
[ < ] Back Previous section in reading order 1.2.2
[ Up ] Up Up section 1.2
[ > ] Forward Next section in reading order 1.2.4
[ >> ] FastForward Next chapter 2
[Top] Top Cover (top) of document  
[Contents] Contents Table of contents  
[Index] Index Index  
[ ? ] About About (help)  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:


This document was generated on March 25, 2019 using texi2html.