Converting Unix epoch format to normal date for filePro

Larry Hoover larry at hoovercs.com
Thu Jul 22 20:45:20 PDT 2010


Jean-Pierre A. Radley wrote:
> Larry Hoover propounded (on Thu, Jul 22, 2010 at 01:08:43PM -0400):
> | When you take a Unix epoch formatted date such as: 1240432776, you can 
> | convert it to a filePro friendly date such as 04/22/09 in Linux with the 
> | command: 
> | date +%D --date "Jan 1, 1970 00:00:00 +0000 + 1240432776 seconds"
> | I can't seem to find a way to do this in SCO Unix Openserver.  The date 
> | command is different than in Linux.  Does anyone know offhand of a 
> | compatible SCO Unix command to do this, or some way in filePro?
> | 
> 
> I've got a binary called ctime (if I recall, I extracted source code from
> Cnews, but I can't find my ctime.c).  For example:
> 
> 	jpradley:appl 1$ ctime 1240432776
> 	Wed Apr 22 16:39:36 2009
> 	jpradley:appl 2$ ctime -i 1240432776
> 	Wed, 22 Apr 2009 20:39:36 GMT
> 
> I believe binary attachments to any submission to this mailing list
> get zapped, so I've just copied all 4928 bytes of the OSR5 binary to
> ftp.jpr.com/pub.
> 
> If you need to change ctime's output into mm/dd/yy format, throw together
> a few lines of awk.
> 

That works great.. Thanks, JP.


More information about the Filepro-list mailing list