Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I get Breeze.js to save my timezone in my SQL DB
    text
    copied!<p>We are trying to sort out how to have a user input a date-time with a timezone and save that in my SQL database. I have a column of type datetimeoffset in my SQL server. </p> <pre><code> $scope.saveItemChanges = function () { var td = new Date(); $scope.chosenEditItem.ServiceStatusUpdateDateTimeOffset = td; $log.info( td.toString() + "ISO " + td.toISOString() + "UTC " + td.toUTCString() + "JSON " + td.toJSON()); mainDataService.saveChanges() .then (saveSucceededCloseEdit) .fail (displayErrors) } </code></pre> <p>In my database I'm not seeing the timezone. Only rows 1007-1009 got inserted via breeze the other rows are testing.<br> <img src="https://i.stack.imgur.com/bZq7N.jpg" alt="enter image description here"></p> <p>Basically I want to be able to capture the date-time and timezone on the client and store it in my DB. When someones goes back to view the record I need to be able to determine what timezone the date-time is for. I'm not sure what I'm missing in the path from Client -> Server that is stopping the timezone from being saved in the DB. </p> <p><a href="http://www.breezejs.com/documentation/date-time" rel="nofollow noreferrer">Breeze Date Info </a><a href="http://www.breezejs.com/documentation/date-time" rel="nofollow noreferrer">http://www.breezejs.com/documentation/date-time</a></p> <p>Console logging: <img src="https://i.stack.imgur.com/vvBxL.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/eKIXB.png" alt="enter image description here"></p> <p>Database record: <img src="https://i.stack.imgur.com/aL9mB.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload