Re: Dates on Linux vs. Windows - Resolved

2020-01-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jerry, On 1/9/20 1:15 PM, Christopher Schultz wrote: > You should write yourself some small tests in Java to try > everything [you've] read here. Just grab a date value from the > database and inspect the object you get back. Mess with the time >

Re: Dates on Linux vs. Windows - Resolved

2020-01-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jerry, On 1/8/20 6:24 PM, Jerry Malcolm wrote: > > On 1/8/2020 4:47 PM, Christopher Schultz wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 >> >> Johan, >> >> On 1/8/20 3:28 AM, Johan Compagner wrote: >>> So you moved once the database

Re: Dates on Linux vs. Windows - Resolved

2020-01-08 Thread Jerry Malcolm
On 1/8/2020 4:47 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Johan, On 1/8/20 3:28 AM, Johan Compagner wrote: So you moved once the database to a different timezone (that had say that 6 hour difference) then the behavior is correct... Its very weird but

Re: Dates on Linux vs. Windows - Resolved

2020-01-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Johan, On 1/8/20 3:28 AM, Johan Compagner wrote: > So you moved once the database to a different timezone (that had > say that 6 hour difference) then the behavior is correct... > > Its very weird but that is default behavior of the normal

Re: Dates on Linux vs. Windows - Resolved

2020-01-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jerry, On 1/8/20 12:05 AM, Jerry Malcolm wrote: > First of all, a big thank you to everyone who responded to this > one. I doubt I'd have figured it out for days without your > guidance and help. Glad you are all set, though I'm not sure I agree

Re: Dates on Linux vs. Windows

2020-01-08 Thread Terence M. Bandoian
On 1/7/2020 6:53 PM, Jerry Malcolm wrote: >> If your systems always use the same time zone to read and write the data, it isn't a problem. Terrance, thanks for the info. In my case I do only have one timezone (or at least I want to...). Using the string for dates is a good idea. But this

Re: Dates on Linux vs. Windows - Resolved

2020-01-08 Thread Olaf Kock
On 08.01.20 06:05, Jerry Malcolm wrote: > Just to summarize for anybody who comes along with a similar > problem I original set the timezone of mySQL RDS instance to > Central time when I created it months back (unchangable after it's > set).  I set my Linux timezone to Central as well in

Re: Dates on Linux vs. Windows - Resolved

2020-01-08 Thread Greg Huber
>From my past experience with dates and timestamps, it helps to pass the time zone as a jvm parameter when starting tomcat -Duser.timezone=Europe/London On Wed, 8 Jan 2020 at 05:05, Jerry Malcolm wrote: > First of all, a big thank you to everyone who responded to this one. I > doubt I'd

Re: Dates on Linux vs. Windows - Resolved

2020-01-08 Thread Johan Compagner
So you moved once the database to a different timezone (that had say that 6 hour difference) then the behavior is correct... Its very weird but that is default behavior of the normal datetime columns that are created if you move stuff around the database somehow remembers at what timezone the

Re: Dates on Linux vs. Windows - Resolved

2020-01-07 Thread Jerry Malcolm
First of all, a big thank you to everyone who responded to this one.  I doubt I'd have figured it out for days without your guidance and help. And the winner is the JVM timezone.  But the problem was NOT that the JVM wasn't set to US Central time.  The problem was that it WAS set to US

Re: Dates on Linux vs. Windows

2020-01-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jerry, On 1/7/20 7:42 PM, Jerry Malcolm wrote: > Summarizing what I know now... when I use the command line on the > linux instance and do a mysql query, I get the correct date (i.e. > the date that I set, the date I wanted, the date that mySQL

Re: Dates on Linux vs. Windows

2020-01-07 Thread Mark Eggers
On 1/7/2020 1:13 PM, Jerry Malcolm wrote: > On 1/7/2020 3:09 PM, Michael Osipov wrote: >> Am 2020-01-07 um 21:58 schrieb Jerry Malcolm: >>> This may be more of a Java question than Tomcat.  But I'm not sure.  >>> I have the same code, talking to the same MySql Linux (AWS) >>> database.  I read a

Re: Dates on Linux vs. Windows

2020-01-07 Thread Jerry Malcolm
>> If your systems always use the same time zone to read and write the data, it isn't a problem. Terrance, thanks for the info.  In my case I do only have one timezone (or at least I want to...).  Using the string for dates is a good idea.  But this is a massive application that's been in

Re: Dates on Linux vs. Windows

2020-01-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Zahid, On 1/7/20 4:19 PM, Zahid Rahman wrote: > If you wish to find out if the database connection API is buggy. > > Is the result when you use select query from each of the operating > system same. > > Select column_name from table; > > > If

Re: Dates on Linux vs. Windows

2020-01-07 Thread Christopher Schultz
ield in >>> the SAME database. Only thing different is >Linux/Windows OS >> >> >> >> On Tue, 7 Jan 2020, 21:52 , >> wrote: >> >>>> -Original Message- From: Jerry Malcolm >>>> Sent: Tuesday, January 07, 2020 3:

Re: Dates on Linux vs. Windows

2020-01-07 Thread Jerry Malcolm
Summarizing what I know now... when I use the command line on the linux instance and do a mysql query, I get the correct date (i.e. the date that I set, the date I wanted, the date that mySQL exports to SQL file, and the date that appears in Windows tomcat).  So this pretty much rules out the

Re: Dates on Linux vs. Windows

2020-01-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jerry, On 1/7/20 7:03 PM, Jerry Malcolm wrote: > > On 1/7/2020 5:31 PM, calder wrote: >> On Tue, Jan 7, 2020, 17:17 Jerry Malcolm >> wrote: >> On Tue, 7 Jan 2020, 21:52 , wrote: >> '. What do I set/change? > Those millisecond

Re: Dates on Linux vs. Windows

2020-01-07 Thread Terence M. Bandoian
y Malcolm Sent: Tuesday, January 07, 2020 3:14 PM To: users@tomcat.apache.org Subject: Re: Dates on Linux vs. Windows On 1/7/2020 3:09 PM, Michael Osipov wrote: Am 2020-01-07 um 21:58 schrieb Jerry Malcolm: This may be more of a Java question than Tomcat. But I'm not sure. I have the same code

Re: Dates on Linux vs. Windows

2020-01-07 Thread Jerry Malcolm
On 1/7/2020 5:31 PM, calder wrote: On Tue, Jan 7, 2020, 17:17 Jerry Malcolm wrote: On Tue, 7 Jan 2020, 21:52 , wrote: '. What do I set/change? Those millisecond values are 6 hours apart, which looks like a timezone issue. I happen to be in US Central time, which is 6 hours earlier than

Re: Dates on Linux vs. Windows

2020-01-07 Thread calder
On Tue, Jan 7, 2020, 17:17 Jerry Malcolm wrote: > > > On Tue, 7 Jan 2020, 21:52 , wrote: > '. What do I set/change? > > >> Those millisecond values are 6 hours apart, which looks like a timezone > >> issue. I happen to be in US Central time, which is 6 hours earlier than > >> UTC in

Re: Dates on Linux vs. Windows

2020-01-07 Thread Jerry Malcolm
y Malcolm Sent: Tuesday, January 07, 2020 3:14 PM To: users@tomcat.apache.org Subject: Re: Dates on Linux vs. Windows On 1/7/2020 3:09 PM, Michael Osipov wrote: Am 2020-01-07 um 21:58 schrieb Jerry Malcolm: This may be more of a Java question than Tomcat. But I'm not sure. I have the same code

Re: Dates on Linux vs. Windows

2020-01-07 Thread Zahid Rahman
; Sent: Tuesday, January 07, 2020 3:14 PM > > To: users@tomcat.apache.org > > Subject: Re: Dates on Linux vs. Windows > > > > On 1/7/2020 3:09 PM, Michael Osipov wrote: > > > Am 2020-01-07 um 21:58 schrieb Jerry Malcolm: > > >> This may be more of a Java

RE: Dates on Linux vs. Windows

2020-01-07 Thread John.E.Gregg
> -Original Message- > From: Jerry Malcolm > Sent: Tuesday, January 07, 2020 3:14 PM > To: users@tomcat.apache.org > Subject: Re: Dates on Linux vs. Windows > > On 1/7/2020 3:09 PM, Michael Osipov wrote: > > Am 2020-01-07 um 21:58 schrieb Jerry Malcolm: >

Re: Dates on Linux vs. Windows

2020-01-07 Thread Zahid Rahman
If you wish to find out if the database connection API is buggy. Is the result when you use select query from each of the operating system same. Select column_name from table; If select on both return values are same then likely the database API is buggy. You have choice of two database

Re: Dates on Linux vs. Windows

2020-01-07 Thread Jerry Malcolm
On 1/7/2020 3:09 PM, Michael Osipov wrote: Am 2020-01-07 um 21:58 schrieb Jerry Malcolm: This may be more of a Java question than Tomcat.  But I'm not sure.  I have the same code, talking to the same MySql Linux (AWS) database.  I read a date column value in a Tomcat app.  After calling

Re: Dates on Linux vs. Windows

2020-01-07 Thread Felix Schumacher
Am 07.01.20 um 21:58 schrieb Jerry Malcolm: > This may be more of a Java question than Tomcat.  But I'm not sure.  I > have the same code, talking to the same MySql Linux (AWS) database.  I > read a date column value in a Tomcat app.  After calling > resultSet.getDate(...) I printed the date

Re: Dates on Linux vs. Windows

2020-01-07 Thread Michael Osipov
Am 2020-01-07 um 21:58 schrieb Jerry Malcolm: This may be more of a Java question than Tomcat.  But I'm not sure.  I have the same code, talking to the same MySql Linux (AWS) database.  I read a date column value in a Tomcat app.  After calling resultSet.getDate(...) I printed the date

Dates on Linux vs. Windows

2020-01-07 Thread Jerry Malcolm
This may be more of a Java question than Tomcat.  But I'm not sure.  I have the same code, talking to the same MySql Linux (AWS) database.  I read a date column value in a Tomcat app.  After calling resultSet.getDate(...) I printed the date instance and the getTime() value: On windows: