0

I'm using two softwares dbvisualizer and PGAdmin and connecting to the same database say db(Postgresql). The database db has a table timeRecord with a column which has a datatype as timestamp. I'm connecting both PGAdmin and dbvisualizer to db, and open table timeRecord. The value in the column with datatype timestamp in both dbvisualizer and pgadmin are different, even though I'm connecting to the same database. My Java application uses the value that is seen in dbvisualizer and .net app uses the value in pgadmin(There is data mismatch because of this). Can anyone please help me with this?

Thank you.

RakeshArk
  • 1
  • 4
  • Since we're talking about a timestamp, are you sure the data itself is different and not just the representation of the time in the application—i.e. the formatting? – Daniel Lyons Dec 11 '15 at 05:44
  • Hi, The data is different. There is 5hours 30 minutes difference in all the values from dbvisualizer to pgadmin. – RakeshArk Dec 11 '15 at 05:57
  • 1
    Are you in a time zone that happens to be 5:30 different from UTC? :) Such as Bangalore? ;) – Daniel Lyons Dec 11 '15 at 06:01
  • yes, I'm from Bangalore,India, hence UTC+5:30 – RakeshArk Dec 11 '15 at 06:03
  • 1
    Yeah, so one tool is showing you timestamps in UTC and the other in local time. The times are the same, they're just rendered differently. – Daniel Lyons Dec 11 '15 at 06:03
  • Okay. Also as I mentioned java code uses the +5:30 (I'm not adding the same anywhere) value where as the .net uses just UTC. Can you help me on that? – RakeshArk Dec 11 '15 at 06:07
  • Well, you have to decide which one is wrong. If you want the app to use UTC then you have to change the time zone for Java. If you want the app to use local time, you have to figure out why the .NET app is using UTC instead and change that. Once you know which behavior is incorrect, you can search for how to fix it for Java or .NET. – Daniel Lyons Dec 11 '15 at 06:10
  • Thank you. I will check that. – RakeshArk Dec 11 '15 at 06:39

0 Answers0