Dear list,

I´m calculating time differences between series of time stamps and I noticed
something odd:

If I do this...

> time1=strptime("2009 05 31 22 57 00",format="%Y %m %d %H %M")
> time2=strptime("2009 05 31 23 07 00",format="%Y %m %d %H %M")
>
> diff(c(time1,time2),units="mins")
Time difference of 10 mins

.. I get the correct response in minutes.  But if I try the same thing with
different values, say..

> time3=strptime("2009 06 01 00 47 00",format="%Y %m %d %H %M")
> time4=strptime("2009 06 01 00 57 00",format="%Y %m %d %H %M")
>
> diff(c(time3,time4))
Time difference of NA secs

...which is not what I´m looking for. The difference should also be 10
minutes.

I burned a few neurons (and searched the documentation) and I cannot figure
why this happens.  Any ideas?

All the best,

Julian

Julian Mariano Burgos
Hafrannsóknastofnunin/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is, jmburgos@uw.edu

	[[alternative HTML version deleted]]

