How can I get Breeze.js to save my timezone in my SQL DB
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.
$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)
}
In my database I'm not seeing the timezone. Only rows 1007-1009 got
inserted via breeze the other rows are testing.
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.
Breeze Date Info http://www.breezejs.com/documentation/date-time
This comment has been removed by the author.
ReplyDelete