Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* SUMMARY: Converting time (since 01-01-1970) to Epoch
@ 1999-05-20  7:59 Franco Tassone
  0 siblings, 0 replies; only message in thread
From: Franco Tassone @ 1999-05-20  7:59 UTC (permalink / raw)
  To: axp-list

Thanks to all who answered.

Two consideration arose:

- SGI is little endian, while AlphaLinux is big endian but ...

- Although shifting/redefining/setting the ut_time variable in ru_utmp
  structure of AlphaLinux, the result is only garbled dates.
  Various attempt were made, building structures as suggested from you
  all or shifting the data; the attempts were made both in IRIX box and
  AlphaLinux box; no success, at the moment.

Solution: Re-wrote the original file in the SGI box substituting the
          original value (ut_date as long) with the ascii value
          returned by ctime(3).
          Then re-converted to ut_time, on AlphaLinux, using
          strptime and mktime.

Thanks to you all.
-------------------------------------------------------------
 Franco Tassone                       Tel: +39-085-4510954
 RGNetWork Internet Service Provider  Fax: +39-085-64070
 Via G. D'Annunzio, 162               e-mail: admin@rgn.it
 65127 PESCARA (ITALY)                URL: http://www.rgn.it
-------------------------------------------------------------


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-05-20  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-20  7:59 SUMMARY: Converting time (since 01-01-1970) to Epoch Franco Tassone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox