System time and Cron time stamp not matching

On Solaris 10 server the system date won't match with the timestamp on files created by a cron jobs, Please help

here is what i get when i check for system date

infodba-ie10ux014:/tcpdv1_ie10/tcadmin/bin\n\r-> date
Tue Apr 24 15:27:43 GMT 2012

at same time i executed a cron job, and checked time stamp on log generated from cron Job

infodba-ie10ux014:/tcpdv1_ie10/tcadmin/bin\n\r-> ls -l /tcpdv1_ie10/tcadmin/cronlogs/user_login.log
-rw-r--r--   1 infodba  tcgrp        243 Apr 24 10:10 /tcpdv1_ie10/tcadmin/cronlogs/user_login.log

Don't know what's causing this issue

so the system date is "Tue Apr 24 15:27:43" and time stamp on the file created by cron is "Apr 24 10:10"

looks like it's due to timezone configuration.
execute grep TZ ~/.*profile and post what it returns.

Is the script the same one which you were testing in your previous thread? It messes with the TZ variable:
http://www.unix.com/shell-programming-scripting/182879-sorting-user-last-login-count-2.html

What is you normal timezone?

I suspect that the script running from cron is messing with the timezone.
In case your cron is not set up correctly, please try a one-off script run form cron with output redirected to a file and containing these two commands:

date
set

Then compare the date of the log file with the output from the date command taking into account the value of $TZ .

Hello sailesh

grep TZ ~/.*profile

returned empty, i checked my .profile
here is how it looks

infodba-ie10ux014:/home/infodba\n\r-> cat .profile
#       This is the default standard profile provided to a user.
#       They are expected to edit it to meet their own needs.
#  Raghu added the new PATH /SPLM/tcadmin/bin

export EDITOR=vi
MAIL=/usr/mail/${LOGNAME:?}

. $HOME/.kshrc

PATH=/tcpdv1_ie10/tcadmin/bin:$HOME/bin:/usr/X/bin:$PATH
PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin
PATH=$HOME/bin:/usr/X/bin:$PATH
set -o vi
# Disabled until server share is enabled
aview


UGS_LICENSE_SERVER=xxxx@XXXXXXXXX; export UGS_LICENSE_SERVER
# FMS_HOME=/SPLM/Teamcenter83/fcc; export FMS_HOME

Hello Methyl
I executed the cron script as you suggested, from the output this what i get for TZ

TZ=Asia/Calcutta

when i directly execute the date command from shell i get

infodba-ie10ux014:/home/infodba\n\r-> date
Wed Apr 25 12:12:16 GMT 2012

Since my Timezone is Asia/Calutta, does teh GMT need to be changed?,

Raghu

---------- Post updated at 04:09 AM ---------- Previous update was at 01:43 AM ----------

i checked my /etc/TIMEZONE

# be enclosed in double quotes (") or single quotes (').
#
TZ=Asia/Calcutta
CMASK=022
LANG=en_US.UTF-8

The syntax for the value of TZ in /etc/TIMEZONE looks wrong to me.
Anybody with a similar Solaris in that part of the world got a view on this?

Can't see where GMT0BST came from. Is the value being overridden in /etc/profile ?