STATUS<15> conversion to local time

35 views
Skip to first unread message

JOSE L MARTINEZ-AVIAL

unread,
Jun 22, 2010, 4:19:58 PM6/22/10
to jb...@googlegroups.com
Hello,
  Acording to the Jbase Programmger guide, the STATUTS statement returns some information about a file. Part of that information is the "Time of last modification in internal format", which appears to be in UTC. I'm trying to convert that time to local time, but It seems I'm missing something, since it is miscalculating the time by an hour.  I've written the following code as an example:

      MY.PATH = 'test'
      FN.INPUT = 'US0010001_FOREX.csv.2010062238997'
      EXECUTE \SH -c 'ls -lrtd "\:MY.PATH:"/":FN.INPUT:\"'\
      OPENSEQ MY.PATH:"/":FN.INPUT TO F.INPUT THEN
         STATUS ESTADO FROM F.INPUT THEN
            time.utc = ESTADO<15>
            DISPLAY "time.utc ":time.utc
            DISPLAY OCONV(time.utc,'U0FF0')
            DISPLAY OCONV(OCONV(time.utc,'U0FF0'),'MT')
         END
      END
      RETURN

When I execute it, it shows the following information:
-rw-r--r--   1 cpyprd     miaprd        5218 Jun 22 10:49 test/US0010001_FOREX.csv.2010062238997
time.utc 53393
35393
09:49

   So the file was created as 10:49 local time (NY Time)/14:49 UTC. But when I convert it to Jbase internal Time, it shows 09:49. Why is there such a difference?. Anyone has any idea?

Thanks
Jose Luis

jsh cpyprd ~ -->jdiag
        jdiag - jBASE diagnostic '$Revision: 1.15 $'

System Information
==================

System                      : HP-UX miaux B.11.11.U 9000/800
UNIX User                   : cpyprd (uid 117, euid 117)
Tty name                    : /dev/pts/tcc
Time                        : Tue Jun 22 16:18:50 2010

Environment
===========

JBCPORTNO                   : Not Set
JBCRELEASEDIR               : '/apps/jbase5.0.14'
JBCGLOBALDIR                : '/apps/jbase5.0.14'
JBCDATADIR                  : '/ve1/miaprd/bnk/bnk.run/../bnk.data'
HOME                        : '/ve1/miaprd/bnk/bnk.run'
JEDIFILEPATH                : '/ve1/miaprd/bnk/bnk.run'
JEDIFILENAME_MD             : '/ve1/miaprd/bnk/bnk.run/VOC'
JEDIFILENAME_SYSTEM         : '/apps/jbase5.0.14/src/SYSTEM'
RELEASE Information         : Major 5.0 , Minor 14 , Patch 0287 (Change 73758)
Spooler dir (JBCSPOOLERDIR) : '/ve1/miaprd/bnk/bnk.run/jspooler'
JBCEMULATE                  : 'prime'
WARNING: Cannot access Executable path '/ve1/miaprd/bnk/bnk.run/globuspatchbin', error 2
WARNING: Cannot access Library path '/apps/jbase5.0.14/jdk/jre/lib', error 2
Object path (JBCOBJECTLIST) : '/ve1/miaprd/bnk/bnk.run/globuspatchlib:/ve1/miaprd/bnk/bnk.run/lib:/ve1/miaprd/bnk/bnk.run/globuslib'
jBASE Compiler Run-time     : '/apps/jbase5.0.14/config/system.properties'
Program dir (JBCDEV_BIN)    : '/ve1/miaprd/bnk/bnk.run/bin'
Subroutine dir (JBCDEV_LIB) : '/ve1/miaprd/bnk/bnk.run/lib'
Max open files              : 2048
jsh cpyprd ~ -->

FFT...@aol.com

unread,
Jun 23, 2010, 6:02:10 PM6/23/10
to jb...@googlegroups.com
In a message dated 6/23/2010 11:32:51 AM Pacific Daylight Time, jlm...@gmail.com writes:


When I execute it, it shows the following information:
-rw-r--r--   1 cpyprd     miaprd        5218 Jun 22 10:49 test/US0010001_FOREX.csv.2010062238997
time.utc 53393
35393
09:49

   So the file was created as 10:49 local time (NY Time)/14:49 UTC. But when I convert it to Jbase internal Time, it shows 09:49. Why is there such a difference?. Anyone has any idea?

Thanks
Jose Luis



Daylight Savings Time error.

VK

unread,
Jun 24, 2010, 2:06:53 AM6/24/10
to jBASE
Hi,
check your JBASE_TIMEZONE environment setting/

VK
Reply all
Reply to author
Forward
0 new messages