Re: useDaylightTime() ??

2012-08-18 Thread Jesse Tayler
On Aug 16, 2012, at 1:28 PM, Chuck Hill ch...@global-village.net wrote:

 When the date data is formatted in a human readable form, that is when the 
 time zone comes into play.  Try formatting with both the Java 
 SimpleDateFormat (which I recommend using in any case) and NSTimestamp 
 formatter.  Any difference would indicate a bug in NSTimestampFormatter or in 
 the underlying time zone data it is using.  If they are both wrong, something 
 else is going on.

Thanks Ramsey and Chuck!

I'm using ERRest and an iPhone client (.bplist)

I added Ramsey's suggested timezone assurances to the app, but it already seems 
to think in GMT

I note: ERRest reports a dates with the expected GMT running on the server or 
my laptop:

created = 2012-08-19 00:27:45 Etc/GMT;

The WO App creates a new object and sets the created date with the same result 
- an hour early -59 minutes, etc.

If the database and app are both GMT and the app is reporting GMT dates, then 
what's left for the hour off thing?

Oddly, in a situation where I set an adjusted date on the iPhone client, it 
seem to be of the correct time when that time is reported back to the iPhone 
again from the server.

If the date is create by the WO app, it is off - if it is created on the iPhone 
client, it seems right.



 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: useDaylightTime() ??

2012-08-18 Thread Jesse Tayler

er, this is NOT the case - all times are an hour ago.



On Aug 18, 2012, at 8:43 PM, Jesse Tayler jtay...@oeinc.com wrote:

 Oddly, in a situation where I set an adjusted date on the iPhone client, it 
 seem to be of the correct time when that time is reported back to the iPhone 
 again from the server.
 
 If the date is create by the WO app, it is off - if it is created on the 
 iPhone client, it seems right.

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: useDaylightTime() ??

2012-08-16 Thread WebObjects TORAcom
Hi Jesse,

The date with the problem is stored in a database?

We got some problems with Postgresql. Date and timezone on server was ok but 
not in postgres.

We found this instruction:

ALTER DATABASE postgres SET timezone to 'Mexico/General';
 
That made the trick.

Hope this helps.

Miguel Torres.

On 14/08/2012, at 11:29, Jesse Tayler jtay...@oeinc.com wrote:

 My server time is off a suspicious negative one hour, which I presume to be a 
 daylight savings problem.
 
 UNIX returns the date I expect.
 
 So, I'd guess this is a Java or WO settings issue?
 
 A long time ago, on a server far away, 
 
 there were some issues with missing timezone files used by Java and installed 
 by WO or vice versa?
 
 Does anyone know where best to find out what's responsible for the date being 
 returned an hour off to my client?
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/wo%40toracom.net
 
 This email sent to w...@toracom.net
 



 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: useDaylightTime() ??

2012-08-16 Thread Jesse Tayler
oh, that might be the trouble -- I didn't think about the database encoding.

I'm using mysql, but I checked the db properties and found UTC?My server is EDT, or easter with daylight savings, for NYC. Unix reports Thu Aug 16 12:03:04 EDT 2012Should this be set to EDT? UTC is GMT right? That would be more like 8 hours off, no?Anyone know how Mysql should get setup or if this is ok?thanks!
On Aug 16, 2012, at 12:55 AM, WebObjects TORAcom w...@toracom.net wrote:Hi Jesse,The date with the problem is stored in a database?We got some problems with Postgresql. Date and timezone on server was ok but not in postgres.We found this instruction:ALTER DATABASE postgres SET timezone to 'Mexico/General';That made the trick.Hope this helps.Miguel Torres.On 14/08/2012, at 11:29, Jesse Tayler jtay...@oeinc.com wrote:My server time is off a suspicious negative one hour, which I presume to be a daylight savings problem.UNIX returns the date I expect.So, I'd guess this is a Java or WO settings issue?A long time ago, on a server far away, there were some issues with missing timezone files used by Java and installed by WO or vice versa?Does anyone know where best to find out what's responsible for the date being returned an hour off to my client? ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:https://lists.apple.com/mailman/options/webobjects-dev/wo%40toracom.netThis email sent to w...@toracom.net


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: useDaylightTime() ??

2012-08-16 Thread Jesse Tayler

If my app output logs report the correct time, which they do:

Aug 16 12:21:17 WOMan[2002] DEBUG NSLog  -  === Commit Internal 
Transaction

then, WO / Java have a correct timezone too.

therefore, this must be mysql?



On Aug 16, 2012, at 12:04 PM, Jesse Tayler jtay...@oeinc.com wrote:

 oh, that might be the trouble -- I didn't think about the database encoding.
 
 I'm using mysql, but I checked the db properties and found UTC?
 
 My server is EDT, or easter with daylight savings, for NYC. Unix reports Thu 
 Aug 16 12:03:04 EDT 2012
 
 Should this be set to EDT? UTC is GMT right? That would be more like 8 hours 
 off, no?
 
 Anyone know how Mysql should get setup or if this is ok?
 
 thanks!
 
 Screen Shot 2012-08-16 at 11.59.39 AM.png
 
 On Aug 16, 2012, at 12:55 AM, WebObjects TORAcom w...@toracom.net wrote:
 
 Hi Jesse,
 
 The date with the problem is stored in a database?
 
 We got some problems with Postgresql. Date and timezone on server was ok but 
 not in postgres.
 
 We found this instruction:
 
 ALTER DATABASE postgres SET timezone to 'Mexico/General';
  
 That made the trick.
 
 Hope this helps.
 
 Miguel Torres.
 
 On 14/08/2012, at 11:29, Jesse Tayler jtay...@oeinc.com wrote:
 
 My server time is off a suspicious negative one hour, which I presume to be 
 a daylight savings problem.
 
 UNIX returns the date I expect.
 
 So, I'd guess this is a Java or WO settings issue?
 
 A long time ago, on a server far away, 
 
 there were some issues with missing timezone files used by Java and 
 installed by WO or vice versa?
 
 Does anyone know where best to find out what's responsible for the date 
 being returned an hour off to my client?
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/wo%40toracom.net
 
 This email sent to w...@toracom.net
 
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
 
 This email sent to jtay...@oeinc.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: useDaylightTime() ??

2012-08-16 Thread WebObjects TORAcom
Hi Jesse,

The problem we got with postgresql was in the period of time day light time in 
U.S. begins because in Mexico begins later.

We found the datetimes stored in our database with a one hour offset during 
that period, once daylight begins in Mexico everything gets normal . The server 
timezone was correct (America / Mexico City) but for one reason time zone in 
postgres was Chicago (or something else).

I am not sure if this is your case.

Hope this helps.


On 16/08/2012, at 11:27, Jesse Tayler jtay...@oeinc.com wrote:

 
 If my app output logs report the correct time, which they do:
 
   Aug 16 12:21:17 WOMan[2002] DEBUG NSLog  -  === Commit Internal 
 Transaction
 
 then, WO / Java have a correct timezone too.
 
 therefore, this must be mysql?
 
 
 
 On Aug 16, 2012, at 12:04 PM, Jesse Tayler jtay...@oeinc.com wrote:
 
 oh, that might be the trouble -- I didn't think about the database encoding.
 
 I'm using mysql, but I checked the db properties and found UTC?
 
 My server is EDT, or easter with daylight savings, for NYC. Unix reports Thu 
 Aug 16 12:03:04 EDT 2012
 
 Should this be set to EDT? UTC is GMT right? That would be more like 8 hours 
 off, no?
 
 Anyone know how Mysql should get setup or if this is ok?
 
 thanks!
 
 Screen Shot 2012-08-16 at 11.59.39 AM.png
 
 On Aug 16, 2012, at 12:55 AM, WebObjects TORAcom w...@toracom.net wrote:
 
 Hi Jesse,
 
 The date with the problem is stored in a database?
 
 We got some problems with Postgresql. Date and timezone on server was ok 
 but not in postgres.
 
 We found this instruction:
 
 ALTER DATABASE postgres SET timezone to 'Mexico/General';
  
 That made the trick.
 
 Hope this helps.
 
 Miguel Torres.
 
 On 14/08/2012, at 11:29, Jesse Tayler jtay...@oeinc.com wrote:
 
 My server time is off a suspicious negative one hour, which I presume to 
 be a daylight savings problem.
 
 UNIX returns the date I expect.
 
 So, I'd guess this is a Java or WO settings issue?
 
 A long time ago, on a server far away, 
 
 there were some issues with missing timezone files used by Java and 
 installed by WO or vice versa?
 
 Does anyone know where best to find out what's responsible for the date 
 being returned an hour off to my client?
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/wo%40toracom.net
 
 This email sent to w...@toracom.net
 
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
 
 This email sent to jtay...@oeinc.com
 

 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: useDaylightTime() ??

2012-08-16 Thread Chuck Hill
Java and WebObjects store all times in GMT (aka UTC) internally.  So if your DB 
server is on UTC there should not be any conversions when the data is moved 
back and forth.  When the date data is formatted in a human readable form, that 
is when the time zone comes into play.  Try formatting with both the Java 
SimpleDateFormat (which I recommend using in any case) and NSTimestamp 
formatter.  Any difference would indicate a bug in NSTimestampFormatter or in 
the underlying time zone data it is using.  If they are both wrong, something 
else is going on.

Chuck


On 2012-08-16, at 9:04 AM, Jesse Tayler wrote:

 oh, that might be the trouble -- I didn't think about the database encoding.
 
 I'm using mysql, but I checked the db properties and found UTC?
 
 My server is EDT, or easter with daylight savings, for NYC. Unix reports Thu 
 Aug 16 12:03:04 EDT 2012
 
 Should this be set to EDT? UTC is GMT right? That would be more like 8 hours 
 off, no?
 
 Anyone know how Mysql should get setup or if this is ok?
 
 thanks!
 
 Screen Shot 2012-08-16 at 11.59.39 AM.png
 
 On Aug 16, 2012, at 12:55 AM, WebObjects TORAcom w...@toracom.net wrote:
 
 Hi Jesse,
 
 The date with the problem is stored in a database?
 
 We got some problems with Postgresql. Date and timezone on server was ok but 
 not in postgres.
 
 We found this instruction:
 
 ALTER DATABASE postgres SET timezone to 'Mexico/General';
  
 That made the trick.
 
 Hope this helps.
 
 Miguel Torres.
 
 On 14/08/2012, at 11:29, Jesse Tayler jtay...@oeinc.com wrote:
 
 My server time is off a suspicious negative one hour, which I presume to be 
 a daylight savings problem.
 
 UNIX returns the date I expect.
 
 So, I'd guess this is a Java or WO settings issue?
 
 A long time ago, on a server far away, 
 
 there were some issues with missing timezone files used by Java and 
 installed by WO or vice versa?
 
 Does anyone know where best to find out what's responsible for the date 
 being returned an hour off to my client?
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/wo%40toracom.net
 
 This email sent to w...@toracom.net
 
 
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects









 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: useDaylightTime() ??

2012-08-16 Thread Ramsey Gurley
If using postgres, you need to set the time zone before the driver loads as 
well. Something like this in your application class should do

public class Application extends ERXApplication {
private static Logger log = Logger.getLogger(Application.class);

static {
// Set default time zones
TimeZone.setDefault(TimeZone.getTimeZone(GMT));
NSTimeZone.setDefaultTimeZone(NSTimeZone.getGMT());
}

public static void main(String argv[]) {
ERXApplication.main(argv, Application.class);
}

Ramsey


On Aug 16, 2012, at 10:17 AM, WebObjects TORAcom wrote:

 Hi Jesse,
 
 The problem we got with postgresql was in the period of time day light time 
 in U.S. begins because in Mexico begins later.
 
 We found the datetimes stored in our database with a one hour offset during 
 that period, once daylight begins in Mexico everything gets normal . The 
 server timezone was correct (America / Mexico City) but for one reason time 
 zone in postgres was Chicago (or something else).
 
 I am not sure if this is your case.
 
 Hope this helps.
 
 
 On 16/08/2012, at 11:27, Jesse Tayler jtay...@oeinc.com wrote:
 
 
 If my app output logs report the correct time, which they do:
 
  Aug 16 12:21:17 WOMan[2002] DEBUG NSLog  -  === Commit Internal 
 Transaction
 
 then, WO / Java have a correct timezone too.
 
 therefore, this must be mysql?
 
 
 
 On Aug 16, 2012, at 12:04 PM, Jesse Tayler jtay...@oeinc.com wrote:
 
 oh, that might be the trouble -- I didn't think about the database encoding.
 
 I'm using mysql, but I checked the db properties and found UTC?
 
 My server is EDT, or easter with daylight savings, for NYC. Unix reports 
 Thu Aug 16 12:03:04 EDT 2012
 
 Should this be set to EDT? UTC is GMT right? That would be more like 8 
 hours off, no?
 
 Anyone know how Mysql should get setup or if this is ok?
 
 thanks!
 
 Screen Shot 2012-08-16 at 11.59.39 AM.png
 
 On Aug 16, 2012, at 12:55 AM, WebObjects TORAcom w...@toracom.net wrote:
 
 Hi Jesse,
 
 The date with the problem is stored in a database?
 
 We got some problems with Postgresql. Date and timezone on server was ok 
 but not in postgres.
 
 We found this instruction:
 
 ALTER DATABASE postgres SET timezone to 'Mexico/General';
  
 That made the trick.
 
 Hope this helps.
 
 Miguel Torres.
 
 On 14/08/2012, at 11:29, Jesse Tayler jtay...@oeinc.com wrote:
 
 My server time is off a suspicious negative one hour, which I presume to 
 be a daylight savings problem.
 
 UNIX returns the date I expect.
 
 So, I'd guess this is a Java or WO settings issue?
 
 A long time ago, on a server far away, 
 
 there were some issues with missing timezone files used by Java and 
 installed by WO or vice versa?
 
 Does anyone know where best to find out what's responsible for the date 
 being returned an hour off to my client?
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/wo%40toracom.net
 
 This email sent to w...@toracom.net
 
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
 
 This email sent to jtay...@oeinc.com
 
 
 
  
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


useDaylightTime() ??

2012-08-15 Thread Jesse Tayler
My server time is off a suspicious negative one hour, which I presume to be a 
daylight savings problem.

UNIX returns the date I expect.

So, I'd guess this is a Java or WO settings issue?

A long time ago, on a server far away, 

there were some issues with missing timezone files used by Java and installed 
by WO or vice versa?

Does anyone know where best to find out what's responsible for the date being 
returned an hour off to my client?



 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com