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 8983875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:57:03+00:00 2026-06-15T20:57:03+00:00

I’m having some trouble working with dates. I have an object with a date

  • 0

I’m having some trouble working with dates.

I have an object with a date field:

public DateTime FechaInicio{get; set;}

This definition generates the following field in the database:

FechaInicio datetime not null

Making the request to the web service I get the date ( in the JSON ) in the following format:

“FechaInicio”: “1982-12-02T00: 00:00”

And calling FechaInicio() on tne entity returns a javascript Date object.

Creating a new entity I get the following value:

createPalanca var = function () {
    MetadataStore var = manager.metadataStore;
    metadataStore.getEntityType palancaType = var ("Toggle");
    palancaType.createEntity newPalanca = var ();
    manager.addEntity (newPalanca);

    //Here: newPalanca.FechaInicio () has the value in this format: 1355313343214
    //Expected Date object here
    newPalanca return;
};

After all, my real question is: What format should I use to assign new values ​​to date type fields?

Edit:

After doing some tests, I noticed that if I assign a Date object to the property, everything seems fine until we got to this line:

saveBundleStringified var = JSON.stringify (saveBundle);

saveBundle content is:

FechaInicio: Thu Dec 20 2012 00:00:00 GMT+0100 (Hora estándar romance)

and the saveBundleStringified:

"FechaInicio": "2012-12-19T23:00:00.000Z" <- I guess this is utc format

What finally is stored in the database is: 2012-12-19 23:00:00.0000000

When the result of the call to SaveChanges are returned , they are merged with the entities in cache at the function updateEntity which does this check: if (!core.isDate(val)) that returns false.
As a consequence it is created a new Date object with the wrong date:

function fastDateParse(y, m, d, h, i, s, ms){ //2012 12 19 23 00 00 ""
    return new Date(y, m - 1, d, h || 0, i || 0, s || 0, ms || 0);
}

Correct me if I’m wrong, but I think that’s the problem.

  • 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-06-15T20:57:05+00:00Added an answer on June 15, 2026 at 8:57 pm

    Sorry for taking so long…

    There were bugs with Breeze’s DateTime timezone serialization and the default DateTime values used for newly constructed entities with non-nullable date fields. These are fixed as of v 0.77.2. Please confirm if this set of fixes works for you.

    And thanks for finding these.

    And to answer your question, all date properties on your object should be set to javascript Dates. Breeze should handle all of the serialization issues properly.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.