Mailinglist Archive: opensuse-programming (13 mails)

< Previous Next >
Re: [opensuse-programming] C# DateTime and Linux gettimeofday
  • From: Roger Oberholtzer <roger@xxxxxx>
  • Date: Tue, 24 Jan 2012 14:45:27 +0100
  • Message-id: <1327412727.32680.16.camel@acme.pacific>
On Mon, 2012-01-23 at 18:28 +0100, Per Jessen wrote:

Sure, crazy people all around :-) But I thought you said you get UTC
time from those devices?

It is. It is just that it is encoded using the C# DateTime() mechanism:


which provides values like 5246315282908540247 (in a text string)

The C# DateTime, it seems, has as the start of the Epoch "12:00:00,
January 1, 0001". If they had printed some ISO date format, I would have
been happier. I think it is an odd way to record a UTC time stamp that
is to be used to connect their data to other devices. Danes...

I have discovered that the last 7 values are the fractional part of a
second. So, the value in seconds is:


Since year 1. I am going to check if that is reasonable.

Both Mono

and MS

define the function the same. Perhaps I should peek at the Mono

Yours sincerely,

Roger Oberholtzer

OPQ Systems / Ramböll RST

Office: Int +46 10-615 60 20
Mobile: Int +46 70-815 1696

Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden

To unsubscribe, e-mail: opensuse-programming+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-programming+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups