DateTime

DateTime

inonshainonsha Posts: 5Questions: 4Answers: 0

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

  • allanallan Posts: 61,722Questions: 1Answers: 10,108 Site admin

    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

This discussion has been closed.