UPDATE: Unix Time

From: MARCELO ALONSO MONDRAGON <malonsom_at_villacero.com.mx>
Date: Mon, 26 May 2003 08:40:31 -0600

Thank you for their answers, but How could I make the inverse process?,
convert whatever date in human format to unix format.

In order to get the date in unix format, their answers were:

From: William H. Magill <magill_at_mcgillsociety.org>

#!/usr/bin/perl
#
print scalar(localtime($ARGV[0]));
print "\n";

From: Michael James Bradford <mjbr_at_tdc.dk>

#!/bin/perl
$now=localtime(<stdin>);
print $now,"\n"
If you call the script convert_time.pl, then you run it as follows:
$ echo "1049972098"|convert_time.pl
Thu Apr 10 12:54:58 2003

From: Martin Adolfsson <mad_at_netilium.org>

perl -e 'print time()."\n"'

And other answers more


Marcelo Alonso Mondragón
Soporte Técnico / Informática / SICARTSA
Una Empresa del Grupo Villacero
E-Mail: malonsom_at_villacero.com.mx
Internet: http://www.villacero.com.mx
Received on Mon May 26 2003 - 14:58:52 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:44 NZDT