MB-System Unix Manual Page

mbtime

Section: MB-System 5.0 (1)
Updated: 3 June 2013
Index
 

NAME

mbtime - Translate between calendar time values and unix time.

 

VERSION

Version 5.0

 

SYNOPSIS

mbtime [-Mtime_d -Tyear/month/day/hour/minute/second -V -H]

 

DESCRIPTION

The program mbtime converts time values between unix time (seconds since 1970/01/01 00:00:00.000000) and calendar time (e.g. 2008/006/05/17/24/32.000000). Unix time is also known as POSIX time or epoch time, and are typically represented in MB-System documentation (and source code) as "time_d" values. The input time is set using the command line arguments -Mtime_d for epoch seconds and -Tyear/month/day/hour/minute/second for calendar time. The output time (in the form not specified as input) is written to stdout.

 

AUTHORSHIP

David W. Caress (caress@mbari.org)

  Monterey Bay Aquarium Research Institute
Dale N. Chayes (dale@ldeo.columbia.edu)

  Lamont-Doherty Earth Observatory

 

OPTIONS

-H
This "help" flag cause the program to print out a description of its operation and then exit immediately.
-M
time_d
Sets the input time to be time_d in unix time, which is defined as seconds since 00:00:00.000000 01 January 1970. If -M is specified, this time will be converted to calendar time and output to stdout in the form
        yyyy/mm/dd/hh/mm/ss.ssssss
-T
year/month/day/hour/minute/second
Sets the input time to be year/month/day/hour/minute/second. If -T is specified, this time will be converted to time_d in epoch (Unix) seconds, which are seconds since 00:00:00.000000 01 January 1970. The time_d value will be output to stdout.
-V
Normally, mbtime only prints out the converted time. If the -V flag is given, then mbtime works in a "verbose" mode and also outputs the program version being used.

 

EXAMPLES

Suppose one wishes to convert the current time (06 June 2008 18:37:14.000000) to unix seconds. The following command:
        mbtime -T2008/06/06/18/37/14.0

yields the following result:
        1212777434.000000

Suppose on wishes to convert the unix time 1212777434.0 to calendar time. The following command:
        mbtime -M1212777434.0

yields the following result:
        2008/06/06/18/37/14.000000

 

SEE ALSO

mbsystem(1), mbio(1)

 

BUGS

Never bugs, but perhaps our good friends, the terrestrial isopods.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
AUTHORSHIP
OPTIONS
EXAMPLES
SEE ALSO
BUGS


Last Updated: 3 June 2013


Return to list of MB-System manual pages...

Back to MB-System Home Page...