DateTime
DateTime
Hi,
i have an issue with datetime,
I have currect time and date in DB
but when i get it to the table i get the time with offset + 3
Controller:
new Field('date_opened')
.validator(
Validate.dateFormat(
'YYYY-MM-DD hh:mm:ss',
null,
new Validate.Options({
message: 'Please enter a date in the format yyyy-mm-dd'
})
)
)
.getFormatter(Format.sqlDateToFormat('YYYY-MM-DD hh:mm:ss'))
.setFormatter(Format.formatToSqlDate('YYYY-MM-DD hh:mm:ss'))
);
the server machine time zone is the same as the client.
Thanks.
Answers
Is the offset in the JSON from the server? Could you show me a sample of the data from the database, and also the JSON that is being loaded?
It sounds like something somewhere is adding the timezone offset.
Allan