#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4

    Grid view not showing right time


    Hi Peers,

    i am loading some data into a grid view..everything works fine but the only issue is when a user from east of canada displays the grid it shows the right date (2012-01-06) ... but when somebody else from the west of canada do the same it shows the day before(2012-31-05) which means it is taking the time shift...
    how can i fix this issue

    thank you
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    Since your description is so minimal and you haven't described anything about how you're doing this, what type of grid you're using, or how the data is stored in the database, it's impossible to tell. My guess is that the raw date and time value you're displaying is being converted based on the locale of the user's browser.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4
    Originally Posted by kiteless
    Since your description is so minimal and you haven't described anything about how you're doing this, what type of grid you're using, or how the data is stored in the database, it's impossible to tell. My guess is that the raw date and time value you're displaying is being converted based on the locale of the user's browser.

    Hi kiteless,

    Iam loading excel data into Oracle db.
    this exactly what happens..the cfgrid is displaying the date based on local of the user's browser..

    i have been able to work arround it by converting the date time to_char format in oracle to take it as char..but not sure this the best way to proceed with

    any idea on how to fix that ?

    thanks
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    The default behavior of an Ext grid is to display dates and times relative to the user's locale, since this is what you almost always actually want it to do. The underlying UTC date/time should not be affected. This should be purely visual.

    If you want to alter this, I believe you'd need to dig into the internals of the Ext grid.

IMN logo majestic logo threadwatch logo seochat tools logo