Mailinglist Archive: opensuse-programming (13 mails)

< Previous Next >
Re: [opensuse-programming] C# DateTime and Linux gettimeofday
  • From: Roger Oberholtzer <roger@xxxxxx>
  • Date: Mon, 23 Jan 2012 17:46:42 +0100
  • Message-id: <1327337202.5570.33.camel@acme.pacific>
On Mon, 2012-01-23 at 17:23 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:

The Linux/UNIX gettimeofday() function reports the time in the current
Epoch. That Epoch is defined as starting "00:00:00 UTC, January 1,

C# provides a DateTime interface with a similar concept of time in the
current Epoch. Just to make life interesting, C# defines the Epoch as
being "12:00:00, January 1, 0001". (Note the mysterious absence of UTC
in that start...)

This is, of course, just some offset. My problem is that I am trying
to find out if the offset is some agreed international standard.

I don't think it is - it is operating-system dependent.

This is what I fear.

This question has arisen because we I am integrating some fancy Danish
reflection measurement device into our Linux apps. The data provided
by these devices is timestamped with UTC time - encoded with the C#
DateTime functions, e.g., 5246315282908540247, which must have been
around 1400 UTC today.

Just wondering - why not just stick to UTC timestamps, and ignore the

I could pass the response to the Danes who made the device. They are
already wondering why I use Linux. That tells a bit...

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