| Re: Best way to store a time-stamp [message #38012 is a reply to message #38010] |
Tue, 10 February 2004 05:06  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
M. Katz wrote:
> I'm interested to know what method people use for making a time-stamp.
> With each datapoint I'd like to record the current time, store it, and
> be able to read it and plot with it later.
>
> systime(0) gives a well-formatted string, but it would be difficult to
> deconstruct back into abscissa values.
>
> systime(1) is great for relative and elapsed time, but is it easy to
> convert it into absolute date and time down to fractions of a second?
>
> systime(1, /julian) seems to only change once per second.
>
> Ideally, I'd like a double-precision number that I can store, and a
> function I can use to interpret the values as read-able date stamps.
>
> Thanks,
> M. Katz
We are using Julian Seconds defined by Ray Sterner, (seconds since
2000-01-01 00:00:00)
x=string2js(/now)
print,x
print,js2string(x)
1.2973343e+08
2004-02-10 13:03:47 321
You could find both routines in our library. There are several output
formats defined.
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|
|