Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 543219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:31:42+00:00 2026-05-13T10:31:42+00:00

I have some C# web services that return JSON. The .NET JavaScriptSerializer returns dates

  • 0

I have some C# web services that return JSON. The .NET JavaScriptSerializer returns dates in Epoch Time (milliseconds since 1970). On any Windows machine, the web based application processes the milliseconds back into the proper date without a problem.

On my Mac, the dates are sometimes off by 1 hour. Not every time. Only sometimes. This is now happening on the iPhone front end I’m building as well.

I thought at first that I had lost some precision when dividing the milliseconds by 1000 to create a valid Objective-C NSDate object. Then I tested date creation in javascript on Mac Firefox with the same timestamp and got the same 1 hour offset.

Any ideas? Thanks…

Edit: I also noticed in the Console in XCode that the date created had a -4 or -5 next to it. I’m assuming that is a GMT offset. Those seem to vary independent of whether or not the date is offset by 1 hour. So some -4 dates and some -5 dates are correct and some of either one are offset.

Edit: Examples using:

console.log(new Date(-1173643200000));

returns Sun Oct 23 1932 00:00:00 GMT-0400 (EST)

console.log(new Date(-1031515200000));

returns Sat Apr 24 1937 23:00:00 GMT-0500 (EST)

NSDate* date = [NSDate dateWithTimeIntervalSince1970:ticks / 1000];

-589320000000 =
1951-04-30 00:00:00 -0400

-1173643200000 =
1932-10-22 23:00:00 -0500 

(This one returns correct in Firebug Console, wrong in XCode Console)

-1303416000000 =
1928-09-12 00:00:00 -0400

-1492545600000 =
1922-09-15 00:00:00 -0400

-1263668400000 =
1929-12-16 00:00:00 -0500

-1252094400000 =
1930-04-29 00:00:00 -0400

-1046458800000 =
1936-11-03 00:00:00 -0500

-1298746800000 =
1928-11-05 00:00:00 -0500

-1031515200000 =
1937-04-24 23:00:00 -0500   

(Returns wrong in both Firebug Console and XCode Console)

-910465200000 =
1941-02-24 00:00:00 -0500

-1152648000000 =
1933-06-23 00:00:00 -0400

-1109793600000 =
1934-10-31 23:00:00 -0500

Is it possible that Microsoft/Mozilla/Apple have conflicting rules defining when Daylight Saving Time started back then?

Edit: Mac Firefox and Windows Firefox get different results for -1031515200000. Both machines are set to the same timezone.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:31:43+00:00Added an answer on May 13, 2026 at 10:31 am

    My guess would be platform differences regarding when DST ends and begins. Are the timestamps for current years coming out right?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 339k
  • Answers 339k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Just creating the workspace won't get you the latest version.… May 14, 2026 at 4:30 am
  • Editorial Team
    Editorial Team added an answer See here: What is deferred name resolution and why do… May 14, 2026 at 4:30 am
  • Editorial Team
    Editorial Team added an answer I haven't used action caching, but I know that using… May 14, 2026 at 4:30 am

Related Questions

I'm trying to use jQuery and JSON with a C# Web Service that I
I'm developing out replacements for our company's web service stack. The current stack was
I am creating a javascript API for SCORM 2004 4th Edition. For those who
Ok, I've asked a few related questions here and only ended up with more
I am having some trouble with the classic javascript local variable scope topic, but

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.