2
votes

The Date Column in Grid (also in date form field) is using local browser time zone, but I prefer to use time zone selected in application user profile, rather than using browser timezone.

What can I do about it?

Can I forse ExtJS to use timezone without daylight saving time, so all the date/time combinations are valid like UTC? And which datetime format to use when comunicating with serverside?

I'm using PostgreSQL and also i'm not sure what database column type to use? Now I'm using timestamp with timezone, but not sure if its ok?

1

1 Answers

1
votes

In your EXT code, instead of specifying the date as new Date(), calculate the required date and use: new Date("October 13, 2011 11:13:00") (or whatever your preferred date is). You can do this using convert: in your field definitions.

EDIT: I would assume that the Date column in your grid gets its value from your database, correct? To adjust this you can use the "convert:" function in your field definition and add three hours (or whatever value you need).

{
   name: 'EventDate',
   type: 'date', dateFormat: "Y-m-d G:i:s", <-- adjust as needed
   convert: function(val) {
      return Ext.Date.add(val, Ext.Date.HOUR, 3)
   }
}