IceStorm logger time zone

dougmeredithdougmeredith Doug MeredithOrganization: Skyridge Systems Inc.Project: Home automationMember
The IceStorm logger is showing messages in GMT while my Java programs are using my local time zone. Any idea how to get IceStorm to do the same?

I've searched the manual and the forums both, and found no answer.

Platform is Windows 7, using Ice 3.4.2.

Comments

  • benoitbenoit Rennes, FranceBenoit FoucherOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff
    Hi,

    Hmm, is your system time zone correctly setup? In theory, IceStorm should print the local time if it's using the default logger which prints its output to the standard error, this logger uses the _ftime system call to get the current local time. Is your system perhaps setup to use GMT time and the Java logger has been configured with a different time zone?

    Cheers,
    Benoit.
  • dougmeredithdougmeredith Doug MeredithOrganization: Skyridge Systems Inc.Project: Home automationMember
    Hi Benoit,

    I just double-checked and my time-zone is correctly set for Atlantic Canada. I have done no configuration of the logger in the Java program, and am using the default logger. I have not had time-zone issues with any other program on this computer, and a simple one-line Java program (non-Ice) shows the correct time zone.

    I just tried IceStorm on a different Windows 7 computer, and it is also showing log messages in GMT. A quick test on a Linux system used the correct time zone.

    Doug
  • benoitbenoit Rennes, FranceBenoit FoucherOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff
    Hi,

    Can you confirm that you're using the default Ice logger as well?

    I just tried on my Windows 7 machine and it works fine, it correctly shows the local time. Did you try with another Ice program? For example, does this problem also shows up with the traces printed by the Ice hello demo client when ran with --Ice.Trace.Network?

    Cheers,
    Benoit.
  • dougmeredithdougmeredith Doug MeredithOrganization: Skyridge Systems Inc.Project: Home automationMember
    Hi Benoit,

    I am using the default logger in all cases.

    I don't have a C++ compiler, so I can't build the demo programs, but I just tried icegridregistry, and it also outputs GMT.

    Doug
  • benoitbenoit Rennes, FranceBenoit FoucherOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff
    Hi,

    Are you running those C++ processes under Cygwin by any chance? If that's the case, can you try under a Windows command shell?

    Cygwin sets the TZ environment variable to a value which can't be interpreted by the Microsoft C Runtime and in this case the time zone is assumed to be GMT when the localtime system call converts the UTC time returned by _ftime to a local time string.

    Cheers,
    Benoit.
  • dougmeredithdougmeredith Doug MeredithOrganization: Skyridge Systems Inc.Project: Home automationMember
    Bingo! That's exactly what was going on. Thanks.
Sign In or Register to comment.