TS(1)TS(1)NAME
ts - timestamp input
SYNOPSIS
ts [-r] [format]
DESCRIPTION
ts adds a timestamp to the beginning of each line of input.
The optional format parameter controls how the timestamp is formatted, as used by strftime(3). The default format is "%b %d %H:%M:%S". In
addition to the regular strftime conversion specifications, "%.S" and "%.s" are like "%S" and "%s", but provide subsecond resolution (ie,
"30.00001" and "1301682593.00001").
If the -r switch is passed, it instead converts existing timestamps in the input to relative times, such as "15m5s ago". Many common
timestamp formats are supported. Note that the Time::Duration and Date::Parse perl modules are required for this mode to work.
Currently,A converting localized dates is not supported.
If both -r and a format is passed, the existing timestamps are converted to the specified format.
ENVIRONMENT
The standard TZ environment variable controls what time zone dates are assumed to be in, if a timezone is not specified as part of the
date.
AUTHOR
Copyright 2006 by Joey Hess <joey@kitenet.net>
Licensed under the GNU GPL.
moreutils 2011-04-01 TS(1)
Check Out this Related Man Page
GMSTRFTIME(3) 1 GMSTRFTIME(3)gmstrftime - Format a GMT/UTC time/date according to locale settings
SYNOPSIS
string gmstrftime (string $format, [int $timestamp = time()])
DESCRIPTION
Behaves the same as strftime(3) except that the time returned is Greenwich Mean Time (GMT). For example, when run in Eastern Standard Time
(GMT -0500), the first line below prints "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 01:00:00".
PARAMETERS
o $format
- See description in strftime(3).
o $timestamp
- The optional $timestamp parameter is an integer Unix timestamp that defaults to the current local time if a $timestamp is not
given. In other words, it defaults to the value of time(3).
RETURN VALUES
Returns a string formatted according to the given format string using the given $timestamp or the current local time if no timestamp is
given. Month and weekday names and other language dependent strings respect the current locale set with setlocale(3).
EXAMPLES
Example #1
gmstrftime(3) example
<?php
setlocale(LC_TIME, 'en_US');
echo strftime("%b %d %Y %H:%M:%S", mktime(20, 0, 0, 12, 31, 98)) . "
";
echo gmstrftime("%b %d %Y %H:%M:%S", mktime(20, 0, 0, 12, 31, 98)) . "
";
?>
SEE ALSO strftime(3).
PHP Documentation Group GMSTRFTIME(3)
Looking at the member list, there are alot of interesting names, some unique, some bizarre, and some that are just plain. How did you come by your name? Why did you choose your label?
Me? Well, I wish I could change mine. I chose Google because thats how I stumbled upon this site. I wasn't sure... (66 Replies)
All,
I need l help in writing a script;
I have a file with header on the first row data rows next and the last row in the file contains the record count of the data records only. I need to remove the last and first line and check to see that the data rows match the count on the last line. ... (61 Replies)
Hi,
I need to conver the date format to binary and then subract it by one which will result me an output with yesterdays date and use it..
So that i will use the out and delete all the folders which are of minus one days.i.e if today is 2010-03-18 (this is a folder format at some xyz location).... (59 Replies)
I have a short script for compiling an old program. It's a simple text file 'ccprog' created in emacs. The permissions were changed with 'chmod 775 ccprog' to make it an executable. When I try to run ccprog I get "bash: ./ccprog: No such file or directory". If I change to tcsh ccprog runs. Why... (68 Replies)
Hi,
At first I have to say that I know nothing about Linux :(
But I am looking for solution how to copy one file from internal Lowrnace HDS flash memory.
Lowrance HDS is Linux based device.
Here is the link for firmware update files for this unit.
At the end of main firmware file there... (62 Replies)
Discussion started by: PouchX
62 Replies
7. Post Here to Contact Site Administrators and Moderators
Hello. I've searched the site but can't find a link to what the "Bits" and "bank account" is on my user profile. Can someone link me or briefly explain? (76 Replies)
Hello to all,
I would like to search sequences of bytes inside big binary file.
The bin file contains blocks of information, each block begins is estructured as follow:
1- Each block begins with the hex 32 (1 byte) and ends with FF. After the FF of the last block, it follows 33.
2- Next... (59 Replies)
This is a DEMO shell script to generate a simple graticule and plot inside it...
Apologies for any typos...
it is another building block along with my other two shell uploads recently to start a semi_serious project of an Terminal_AudioScope...
The fist upload I posted recently was to show... (83 Replies)