Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF timestamp

New Here ,
May 10, 2006 May 10, 2006
Hello!

Maybe someone knows a solution to my problem. I hope so!
As the title says, I have got a problem with the ColdFusion timestamp. It displays the time as one hour behind...
Searched the whole day already, without getting forward. Maybe I have searched for the wrong keywords but by now I'm really frustrated and out of Ideas.

We are running a Debian System with CF-MX7, Apache 1.3, mySQL 4.1
The System time and timezone are correct, mySQL gives me the correct time as well... but every CF-Application gives me a time one hour behind.
The "now()"-function gives 15.30 at the moment but we have 16.30
We did not change anything yet, cause everything seems to be right. But obviously it's not!

Any Ideas what it could be or where this can be set? Anyone?
I would be very grateful for any advice! As it is now, it is nearly impossible to compare a datetime from the Database with a datetime from CF... but thats just what I attempted to do the whole day!

Need any further Information? Ask for and I will post it!
Greetings & Thanks a lot in advance, döörk
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
May 10, 2006 May 10, 2006
Could it be an Apache setup parameter? I Googled Debian and Apache and timezone a got a few hits....this is a sample

Debian Administration

Phil
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2006 May 11, 2006
First of all: Thanks for your reply, paross1!

I have googled with your given keywords again yesterday and found a lot... everyone who had a similar problem with Apache reported the logfiles contain the same wrong timeentry.
Our Apachelogs show the correct time. So that seems not to be the problem...
Following I have checked the ColdFusion-logfiles. *tadaa* They report the wrong time, are one hour behind.

That makes me believe it is a CF problem. Next I have tried "GetTimeZoneInfo()" with the following results:
uctTotalOffset = -3600
utcHourOffset = -1
utcMinuteOffset = 0
isDSTon = no

Offset-setting seems to be ok. Probably I have to change the DST-Setting. Well, at least we have Summertime by now.
But how to do that? I haven't found any setting like this in the CF-Administration ...

Help would be appreciated.

Greets & Thanks, döörk!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
May 11, 2006 May 11, 2006
I looked up the SetLocale() function in the ColdFusion LiveDocs, and found some interesting information.

ColdFusion determines the locale value as follows:

By default, ColdFusion uses the JVM locale, and the default JVM locale is the operating system locale. You can set JVM locale value explicitly in ColdFusion MX in the ColdFusion Administrator Java and JVM Settings page JVM Arguments field; for example:
-Duser.language=de -Duser.region=DE.


A locale set using the SetLocale function persists for the current request or until it is reset by another SetLocale function in the request.

If a request has multiple SetLocale functions, the current locale setting affects how locale-sensitive ColdFusion tags and functions, such as the functions that start with LS format data. The last SetLocale function that ColdFusion processes before sending a response to the requestor (typically the client browser) determines the value of the response Content-Language HTTP header. The browser that requested the page displays the response according to the rules for the language specified by the Content-Language header.

ColdFusion ignores any SetLocale functions that follow a cfflush tag.


I would look in your ColdFusion Administrator Java and JVM Settings page JVM Arguments field and see if you have anything there that might be overriding your system values. If so, remove it, if not add it. Hope this helps.

Phil
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2006 May 11, 2006
Would have been nice...

First I had a look at "GetLocale()" which reported the right setting: -> German(Standard)
Second I took a closer look at the CF-Administrator, just in case thats it. There is no entry that overrides my System values, and the mentioned options weren't there.
Although GetLocale() reports right I have added these options. Restarted Server -> same problem as before

Just in case I have overseen sth, here are the JVM-Options:
-server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=128m -Dcoldfusion.rootDir={application.home}/ -Dcoldfusion.libPath={application.home}/lib -Duser.language=de -Duser.region=DE

This afternoon I tried to set TimeZone on Debian again. Just in case there went sth wrong. Therefor I have used "TZselect" but the problem remains.

For now I have solved it like this: I don't use the Database "now()", but give the DB my CF "#now()#". That way everything is one hour behind but I can compare times... :/

My next (last?) Ideas on this:
- It's quite definitely the DST: How can I activate DST in CF?
- It might be the glib... but then I can't change. We installed the testing version of Debian (4.6.15 I think) because our Motherboard is not supported by the stable version. Well, the testing version uses a new glibc. As far as I found out now, the glibc contains the functions for DST... eventually a problem between CF and the new libc? But that would be too much for me, cause I'm quite new to Linux.

Hopefully I'm not the only one with this problem... if I am, I fear this will remain.

@paross1: Thanks a lot for trying to help me. I know it takes some time to look for solutions... and it isn't even for yourself.
Thanks, döörk
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
May 11, 2006 May 11, 2006
Hmmmm, your JVM settings look correct for Germany (Duser.region=DE), and Germany does observe DST. It does look like your server is on DST and ColdFusion return ing time values in standard time, since your server is one hour ahead. What is the actual value in your /etc/TIMEZONE file (echo $TZ)? It probably should be something like TZ='Europe/Berlin'

Interesting reading at The Clock Mini-HOWTO

Phil
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2006 May 12, 2006
LATEST
I was really sure to know that the "/etc/timezone" file shows exactly the same you have assumed. I have looked it up now and its nearly the same, but should be alright as well.
"etc/timezone" -> Europe/Berlin
not: TZ='Europe/Berlin'

There is another interesting point, which leads me to the libc thing again...
The Server we are talking about is our local one (with Debian testing-version) for Development and as Fileserver for our office. The Webservers (with Debian stable) show the right time... yesterday we copied all CF-related files from a working one to our local Server. Restarted the System -> same problem, although this Configuration works correct on the Webservers.
Compared the Server configurations as well, but without result. They seem to be identical.

I have already found some results googling: "debian etc/timezone libc6" or "debian timezone libc6"
But at the moment I have not the time to go through this. I will track this issue at the Weekend!
And then on monday (hopefully) give an result of my research.

Thanks and have nice Weekend! Best regards, döörk

//EDIT
Due to a lot of private trouble I found no time to look further into this issue. So I will not be able to give any result on this tomorrow. Sry for that! But I'll search on soon and reactivate this thread by then.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources