sooprise
sooprise

Reputation: 23187

DateTime.Now Off By An Hour On Coworker's Computer

I have a program that posts Datetime.Now(), but my coworkers computer's DateTime.Now() is off by an hour.

He changed it in his windows Date and Time Properties, but he is still posting a DateTime.Now() that is an hour off.

How can I fix this on his box without making modifications to my program (I have too many projects going on and need a quick fix for now)

Upvotes: 1

Views: 1319

Answers (2)

Hans Passant
Hans Passant

Reputation: 942177

Ask him to enable daylight savings time observance and to verify the timezone. And in general use DateTime.UtcNow. Ask more questions about it at superuser.com

Upvotes: 3

flayn
flayn

Reputation: 5322

Is he in the correct time zone? Better use DateTimeOffset.

Upvotes: 8

Related Questions