You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/01/08 17:18:02 UTC
DO NOT REPLY [Bug 41317] New: - Ant tstamp returns GMT when Server Time is CST
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41317>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41317
Summary: Ant tstamp returns GMT when Server Time is CST
Product: Ant
Version: 1.6.5
Platform: Other
OS/Version: Windows 2000
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: larry.kriv@eds.com
Some work was done on our Windows 2000 servers to prepare them for the change
in Daylight Savings Time dates for 2007. After they had done that work, the
Ant "tstamp" task began to return times in GMT, rather than CST (GMT-6). So
far as I can tell, the server is still set to CST (running "TIME" from a
command prompt returns the proper time and files save to disk show the proper
create and modify timestamp in Windows Esplorer).
How does "tstamp" get the time value that it returns? Anything that you can
tell me to assist our system administrators in figuring this our would be very
much appreciated.
Larry Kriv
larry.kriv@eds.com
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41317] - Ant tstamp returns GMT when Server Time is CST
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41317>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41317
------- Additional Comments From stevel@apache.org 2007-01-08 09:14 -------
yes, if the jvm is 7/8 hours out, then your box is messed up. Having ant wrong
is the least of your systems, as the box is going to make a mess of whatever
network filesystem it gets attached.
Check the date/time dialog in the control panel, make sure the TZ is right
there. If it is, attach an ant -diagnostics trace. If you install Ant1.7 it
actually looks at clock drift between system clock and the timestamp of created
files, which is something you need to test for by the sound fo things,
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41317] - Ant tstamp returns GMT when Server Time is CST
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41317>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41317
------- Additional Comments From larry.kriv@eds.com 2007-01-08 12:00 -------
Created an attachment (id=19374)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19374&action=view)
ant -diagnostics log from tstamp test
This is the diagnostics log that you requested. I noticed that it lists
user.timezone = GMT, yet going to control panel date/time shows the system at
GMT-6 (Central Time).
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41317] - Ant tstamp returns GMT when Server Time is CST
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41317>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41317
peterreilly@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
------- Additional Comments From peterreilly@apache.org 2007-01-08 09:00 -------
Ant does nothing special, it just uses the JVM.
For example:
src/ShowTime.java:
import java.text.SimpleDateFormat;
import java.util.Date;
public class ShowTime {
public static void main(String[] args) throws Exception {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd HHmm");
Date d = new Date();
System.out.println("The time is now: " + format.format(d));
}
}
and build.xml
project>
<mkdir dir="classes"/>
<javac srcdir="src" destdir="classes"
debug="yes"/>
<java classname="ShowTime" classpath="classes"/>
<tstamp/>
<echo>The time is now: ${DSTAMP} ${TSTAMP}</echo>
</project>
Should give the same string.
The changes made to the server must have confused the JVM,
so it started to use the default time zone - GMT.
You can tell the tstamp task to use a specific timezone
by having a nested <format> element.
<tstamp>
<format property="TODAY_CST" pattern="yyyyMMdd HHmm" timezone="CST"/>
</tstamp>
<echo>The time is now: ${TODAY_CST}</echo>
But this is not a general solution.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41317] - Ant tstamp returns GMT when Server Time is CST
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41317>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41317
larry.kriv@eds.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
------- Additional Comments From larry.kriv@eds.com 2007-01-09 11:08 -------
Steve,
Thanks for the help! I knew that this wasn't an Ant bug, but I needed to know
how Ant worked to be able to trace it down. We now have the problem
resolved.
Our SA went into Control Panel | Date/Time | Selected the Time Zone tab | And
reselected (GMT -06:00) Central Time (US & Canada) | Clicked Apply | Clicked
OK. After that, everything was okay.
It was strange in that Date/Time showed the TZ as CT before through Control
Panel. I guess it needed assurances that we really, really wanted it to be
CT. Something for our SA's to be aware of in the future.
Thanks for all of your help!
Larry
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41317] - Ant tstamp returns GMT when Server Time is CST
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41317>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41317
------- Additional Comments From stevel@apache.org 2007-01-09 02:23 -------
Well, there is your underlying problem. The JVM is in the wrong timezone.
I have no idea how Java picks up its timezone information on windows; it is
probably some low level win32 API call like ::GetTimeZoneInformation()
( http://msdn2.microsoft.com/en-gb/library/ms724421.aspx )
If that is the case, TZ info is picked up from the OS. Reboot, and try logging
as someone else to see if either action fixes the problem.
There isnt anything the ant team can do to fix this; its your system
configuration that needs to be debugged. However, when you do find out how to
fix it, please add a note explaning what you did so that other people with the
same problem can find the solution.
-steve
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org