Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. complexity in saving date from different countries

complexity in saving date from different countries

Scheduled Pinned Locked Moved ASP.NET
sysadminalgorithmshelp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NidhiKanu
    wrote on last edited by
    #1

    Hi all, I have deployed one application on server reside in US,now problem is that when any person using this site from india and he save some data in current date but my application is deployed on US Server so it takes system date of that server which is about one day b4 in some cases and when user search that data in this date he could not get it,is there any way to remove this complexity N!dh! :)

    A 1 Reply Last reply
    0
    • N NidhiKanu

      Hi all, I have deployed one application on server reside in US,now problem is that when any person using this site from india and he save some data in current date but my application is deployed on US Server so it takes system date of that server which is about one day b4 in some cases and when user search that data in this date he could not get it,is there any way to remove this complexity N!dh! :)

      A Offline
      A Offline
      Ashutosh Phoujdar
      wrote on last edited by
      #2

      Hi Nidhi, One probable solution for this is to change the default value of date column from **GetDate()**to GetUTCDate() in table defination. This way it will store the date values according to UTC instead of local time zone specific date.

      dnpro "Very bad programmer"

      N 1 Reply Last reply
      0
      • A Ashutosh Phoujdar

        Hi Nidhi, One probable solution for this is to change the default value of date column from **GetDate()**to GetUTCDate() in table defination. This way it will store the date values according to UTC instead of local time zone specific date.

        dnpro "Very bad programmer"

        N Offline
        N Offline
        NidhiKanu
        wrote on last edited by
        #3

        Hi, I have deployed my all code and it is difficult to change this thing on whole application.Perhaps there is any way using globalization element in web.config. N!dh! :)

        A 1 Reply Last reply
        0
        • N NidhiKanu

          Hi, I have deployed my all code and it is difficult to change this thing on whole application.Perhaps there is any way using globalization element in web.config. N!dh! :)

          A Offline
          A Offline
          Ashutosh Phoujdar
          wrote on last edited by
          #4

          I guess you can change it on database table's column definition. There is no code change require for this. :)

          dnpro "Very bad programmer"

          N 1 Reply Last reply
          0
          • A Ashutosh Phoujdar

            I guess you can change it on database table's column definition. There is no code change require for this. :)

            dnpro "Very bad programmer"

            N Offline
            N Offline
            NidhiKanu
            wrote on last edited by
            #5

            Is there any way to convert timezone from database side by changing only definition,not by makeing any changes on procedure N!dh! :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups