Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SYS$ASCUTC

21 views
Skip to first unread message

Rob Brown

unread,
Oct 11, 2000, 3:00:00 AM10/11/00
to

Good Day:

It appears to me that SYS$ASCUTC returns exactly the same thing as
SYS$ASCTIM --- the local time with no addition information to tell you
about what utc is.

What am I doing wrong? Can anybody get it to do something different?
Does VMS UTC support do anything?

Thanks for the information

- Rob


--
--

Rob Brown br...@gmcl.com
G. Michaels Consulting Ltd. (780)438-2101 (voice)
Edmonton (780)437-3367 (FAX)
http://gmcl.com/

fatz...@my-deja.com

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to

> SYS$ASCUTC

1) Where are you getting your UTC time from?
2) What about these logicals?
SYS$TIMEZONE_DAYLIGHT_SAVING
SYS$TIMEZONE_DIFFERENTIAL
SYS$TIMEZONE_NAME
SYS$TIMEZONE_RULE
3) Post a small demonstrative program.

Fatz.


Sent via Deja.com http://www.deja.com/
Before you buy.

Hoff Hoffman

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to

In article <8s2l49$pvm$1...@dagger.ab.videon.ca>, br...@taiga.gmcl.com (Rob Brown) writes:
:It appears to me that SYS$ASCUTC returns exactly the same thing as

:SYS$ASCTIM --- the local time with no addition information to tell you
:about what utc is.

Both sys$asctim and sys$ascutc convert a binary format time (the OpenVMS
quadword format and the opaque binary UTC format, respectively) into a
text format time suitable for display.

What particular problem(s) are you looking to solve?

What language(s) are in use?

What OpenVMS version(s) are in use?

--------------------------- pure personal opinion ---------------------------
Hoff (Stephen) Hoffman OpenVMS Engineering hoffman#xdelta.zko.dec.com


Rob Brown

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
fatz...@my-deja.com wrote:

: 1) Where are you getting your UTC time from?

VMS. I don't supply a 128-bit time. The documentation for SYS$ASCUTC
says "If ... not specified ... $ASCUTC returns the current date and time",
which I assumed meant the current UTC time.

: 2) What about these logicals?

(LNM$PROCESS_TABLE)

(LNM_TESTENV_BROWN)

(LNM$JOB_814BBAC0)

(LNM$GROUP_000005)

(LNM_SPCSYS)

(LNM$SYSTEM_TABLE)

"SYS$TIMEZONE_DAYLIGHT_SAVING" = "1"
"SYS$TIMEZONE_DIFFERENTIAL" = "-21600"
"SYS$TIMEZONE_NAME" = "MDT"
"SYS$TIMEZONE_RULE" = "MST7MDT6,M4.1.0/2,M10.5.0/2"

(DECW$LOGICAL_NAMES)

: 3) Post a small demonstrative program.

IMPLICIT NONE
CHARACTER*50 ASCTIM,ASCUTC
INTEGER SYS$ASCTIM, SYS$ASCUTC
INTEGER STRLEN,TIMLEN,UTCLEN

CALL LIB$SIGNAL (
1 %VAL (SYS$ASCTIM (
1 TIMLEN,
1 ASCTIM,,)),,)
STRLEN=TIMLEN
WRITE (UNIT=6, FMT=1) 'SYS$ASCTIM', TIMLEN, ASCTIM

CALL LIB$SIGNAL (
1 %VAL (SYS$ASCUTC (
1 UTCLEN,
1 ASCUTC,
1 ,
1 )),,)
STRLEN=UTCLEN
WRITE (UNIT=6, FMT=1) 'SYS$ASCUTC', UTCLEN, ASCUTC
STOP

1 FORMAT (' ', A, ' returns ', I2, ' byte string: "',
1 A<STRLEN>, '"')
END

When I run this this program, I get this:

%SYSTEM-S-NORMAL, normal successful completion
SYS$ASCTIM returns 23 byte string: "12-OCT-2000 13:05:49.43"
%SYSTEM-S-NORMAL, normal successful completion
SYS$ASCUTC returns 23 byte string: "12-OCT-2000 13:05:49.66"

SYS$ASCUTC returned a time string for the same time zone as did
SYS$ASCTIM. It is neither UTC, nor is there additional information
included from which UTC could be derived.

Or at least, that is what it looks like to me.

Rob Brown

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
Hoff Hoffman (hof...@xdelta.zko.dec.nospam) wrote:

...

: What particular problem(s) are you looking to solve?

Simply put, I want to display the current UTC time, ie something similar
to GMT. At 12-Oct-2000 18:00, I would like 13-Oct-2000 00:00 to be
displayed (I am in MDT).

The actual application I am thinking of is our history system, which
currently saves data using local system time. During the semi-annual
time-zone change :-( we either overwrite an hour of data or we leave a
hole in the file. Saving the data using UTC rather than local time might
be the easiest way to fix this.

Elsewhere, I have heard that the "correct" method to pass UTC timestamps
to non-VMS systems is to pass an ASCII string. The VMS wizard says system
services have been supplied to create this string (August 1998, I
believe). So far, SYS$ASCUTC does not seem to be it.

: What language(s) are in use?

Fortran, C, and Macro-32.

: What OpenVMS version(s) are in use?

VMS 7.1 and VMS 6.2, alpha and vax.

Thanks for your help.

Hoff Hoffman

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to

In article <8s58jm$apl$1...@dagger.ab.videon.ca>, br...@taiga.gmcl.com (Rob Brown) writes:

:Hoff Hoffman (hof...@xdelta.zko.dec.nospam) wrote:
:...
:
:: What particular problem(s) are you looking to solve?
:
:Simply put, I want to display the current UTC time, ie something similar
:to GMT. At 12-Oct-2000 18:00, I would like 13-Oct-2000 00:00 to be
:displayed (I am in MDT).

UTC is Universal Coordinated Time (UTC). (Yes, UTC and not UCT. The UTC
abbreviation is based on the French-language name for this standard.)

UTC can effectively be treated as GMT -- UTC has a slightly different
definition than GMT, but I'll ignore the details of implementing leap
seconds and such here.

The TDF is the difference between the local time and Universal
Coordinated Time (UTC; the acronym is from the French name).

An example using the utc calls in the DTSS$SHR image -- which are
present on recent versions of OpenVMS; Documentation is included with
DECnet-Plus DTSS/DECdtss -- to retrieve the current time in UTC format
is attached below, as well as the output from an example run and a
subsequent (manual) SHOW TIME and supporting information.

This was from a DECnet Phase IV system running OpenVMS Alpha V7.2-1.

--------------------------- pure personal opinion ---------------------------
Hoff (Stephen) Hoffman OpenVMS Engineering hoffman#xdelta.zko.dec.com


#include <stdio.h>
//
// Build instructions:
//
// $ cc x
// $ link x,sys$input:/opt
// sys$share:dtss$shr/share
// $ run x
//
// Use utc.h, if you have it... Otherwise, define it all here...
//
typedef struct utc
{
char char_array[16];
} utc_t;
extern utc_gettime(void*);
extern utc_mkasctime(void*,void*);
extern utc_ascgmtime(void*,int,void*);
main()
{
utc_t Utc;
char AscTim[35];
utc_gettime(&Utc);
utc_ascgmtime(AscTim, 35, &Utc );
printf("Formatted UTC time is %s\n",AscTim);
return 1;
}
$

$ r x/nodeb
Formatted UTC time is 2000-10-12-22:14:43.980I-----
$ sho time
12-OCT-2000 18:14:45
$ sho log SYS$TIMEZONE_DIFFERENTIAL
"SYS$TIMEZONE_DIFFERENTIAL" = "-14400" (LNM$SYSTEM_TABLE)
$ cc/vers
Compaq C V6.2-006 on OpenVMS Alpha V7.2-1
$


Rob Brown

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
Hoff Hoffman (hof...@xdelta.zko.dec.nospam) wrote:

...

: An example using the utc calls in the DTSS$SHR image -- which are

Thanks. That's useful.

Jordan Henderson

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
In article <8s5drn$j60$1...@mailint03.im.hou.compaq.com>,

Hoff Hoffman <hof...@xdelta.zko.dec.nospam> wrote:
>
>In article <8s58jm$apl$1...@dagger.ab.videon.ca>, br...@taiga.gmcl.com (Rob Brown) writes:
>:Hoff Hoffman (hof...@xdelta.zko.dec.nospam) wrote:
>:...
>:
>:: What particular problem(s) are you looking to solve?
>:
>:Simply put, I want to display the current UTC time, ie something similar
>:to GMT. At 12-Oct-2000 18:00, I would like 13-Oct-2000 00:00 to be
>:displayed (I am in MDT).
>
> UTC is Universal Coordinated Time (UTC). (Yes, UTC and not UCT. The UTC
> abbreviation is based on the French-language name for this standard.)
>

Oh boy! Oh boy! I get to correct Hoff about something! (I'm so
excited... too bad it's not OpenVMS related, that WOULD be an
accomplishment).

The abbreviation UTC is NOT based on the French-language name
for this standard. I quote from "The Time FAQ"
http://www.boulder.nist.gov/timefreq/general/faq.htm
(something I read over carefully during the pre-2000 hysteria):

http://www.boulder.nist.gov/timefreq/general/misc.htm#Anchor-14550

"In 1970 the Coordinated Universal Time system was devised by
an international advisory group of technical experts within
the International Telecommunication Union (ITU). The ITU felt
it was best to designate a single abbreviation for use in all
languages in order to minimize confusion. Since unanimous
agreement could not be achieved on using either the English
word order, CUT, or the French word order, TUC, the acronym
UTC was chosen as a compromise."

I now return you to the on-topic discussion that was already in
progress...

> [much good,substantive discussion snipped]


>
> The TDF is the difference between the local time and Universal
> Coordinated Time (UTC; the acronym is from the French name).

Oops, there you said it again. Wow, I got to correct Hoff TWICE
in the same post! (see above)

> [more good,substantive discussion snipped]

-Jordan Henderson, Pedant
jor...@greenapple.com

Didier Morandi

unread,
Oct 13, 2000, 3:00:00 AM10/13/00
to
Hoff Hoffman wrote:
>
> UTC is Universal Coordinated Time (UTC). (Yes, UTC and not UCT. The UTC
> abbreviation is based on the French-language name for this standard.)

I'm surprized. In French, for UTC, we say TU (Temps Universel) and not
Universel Coordonné Temps :-)

D.

John Laird

unread,
Oct 13, 2000, 3:00:00 AM10/13/00
to

I presume Zulu time is not politically correct any longer ? ;-)

John
--
John Laird

Alan Greig

unread,
Oct 13, 2000, 3:00:00 AM10/13/00
to
On 12 Oct 2000 22:27:03 GMT, hof...@xdelta.zko.dec.nospam (Hoff
Hoffman) wrote:

>
>In article <8s58jm$apl$1...@dagger.ab.videon.ca>, br...@taiga.gmcl.com (Rob Brown) writes:
>:Hoff Hoffman (hof...@xdelta.zko.dec.nospam) wrote:
>:...
>:
>:: What particular problem(s) are you looking to solve?
>:
>:Simply put, I want to display the current UTC time, ie something similar
>:to GMT. At 12-Oct-2000 18:00, I would like 13-Oct-2000 00:00 to be
>:displayed (I am in MDT).
>

> UTC is Universal Coordinated Time (UTC). (Yes, UTC and not UCT. The UTC
> abbreviation is based on the French-language name for this standard.)
>

> UTC can effectively be treated as GMT -- UTC has a slightly different
> definition than GMT, but I'll ignore the details of implementing leap
> seconds and such here.

The British government made a fool of itself a few months ago when it
announced that to mark the year 2000 Britain would set up its own
Internet time servers based at Greenwich. They claimed that existing
US time servers were based on atomic time in the US and that
additional round trip time meant that synching with US servers would
leave you around 1/2 second behind GMT.

Well UTC as maintained by US servers (and all others) is actually the
current time at the zero meridian (ie Greenwich) and NTP goes out of
its way to calculate and account for packet round trip times. Our
server clocks in Scotland are synched with corporate time servers in
the states which synch with US providers and despite fluctuating round
trip times of around 200-300 millseconds the time settles down to be
within 10 milliseconds of that obtained from a UK clock on a direct
landline. Which is about the precision NTP can provide.

The web pages decribing this new British innovation in Internet time
keeping seem to have quietly vanished and nothing more has ben heard
of it agan. Unlke some other government policies :)

--
Alan Greig

Bob Koehler

unread,
Oct 13, 2000, 3:00:00 AM10/13/00
to
In article <4prdusskun7p411ua...@4ax.com>, John Laird <jo...@laird-towers.freeserve.co.uk> writes:
>
> I presume Zulu time is not politically correct any longer ? ;-)
>

Still in use in all civilian air traffic control.

----------------------------------------------------------------------
Bob Koehler | Computer Sciences Corporation
Hubble Space Telescope Payload | Federal Sector, Civil Group
Flight Software Team | please remove ".aspm" when replying

Bill Hobbs

unread,
Oct 13, 2000, 3:00:00 AM10/13/00
to
In article <4prdusskun7p411ua...@4ax.com>, John
Laird <jo...@laird-towers.freeserve.co.uk> wrote:

> I presume Zulu time is not politically correct any longer ? ;-)

I believe the US military assigned letters to all the major
timezones (skipping the half hour ones) way back when ... though
I can't recall seeing any other timezone being referenced by its
letter except for the Z timezone.

And Zulu is the international phonetic pronunciation of Z.

Paul Sture

unread,
Oct 13, 2000, 3:00:00 AM10/13/00
to
In article <8s5hch$11o$1...@lisa.gemair.com>, Jordan Henderson wrote:
> From: jor...@lisa.gemair.com (Jordan Henderson)
> Newsgroups: comp.os.vms
> Subject: Re: SYS$ASCUTC
> Date: 12 Oct 2000 19:27:13 -0400
>
> In article <8s5drn$j60$1...@mailint03.im.hou.compaq.com>,

> Hoff Hoffman <hof...@xdelta.zko.dec.nospam> wrote:
> >
> >In article <8s58jm$apl$1...@dagger.ab.videon.ca>, br...@taiga.gmcl.com (Rob Brown) writes:
> >:Hoff Hoffman (hof...@xdelta.zko.dec.nospam) wrote:
> >:...
> >:
> >:: What particular problem(s) are you looking to solve?
> >:
> >:Simply put, I want to display the current UTC time, ie something similar
> >:to GMT. At 12-Oct-2000 18:00, I would like 13-Oct-2000 00:00 to be
> >:displayed (I am in MDT).
> >
> > UTC is Universal Coordinated Time (UTC). (Yes, UTC and not UCT. The UTC
> > abbreviation is based on the French-language name for this standard.)
> >
>
> Oh boy! Oh boy! I get to correct Hoff about something! (I'm so
> excited... too bad it's not OpenVMS related, that WOULD be an
> accomplishment).
>
Shucks, you beat me to it :-)

> The abbreviation UTC is NOT based on the French-language name
> for this standard. I quote from "The Time FAQ"
> http://www.boulder.nist.gov/timefreq/general/faq.htm
> (something I read over carefully during the pre-2000 hysteria):
>
> http://www.boulder.nist.gov/timefreq/general/misc.htm#Anchor-14550
>
> "In 1970 the Coordinated Universal Time system was devised by
> an international advisory group of technical experts within
> the International Telecommunication Union (ITU). The ITU felt
> it was best to designate a single abbreviation for use in all
> languages in order to minimize confusion. Since unanimous
> agreement could not be achieved on using either the English
> word order, CUT, or the French word order, TUC, the acronym
> UTC was chosen as a compromise."
>
> I now return you to the on-topic discussion that was already in
> progress...
>
[much good,substantive discussion snipped]

From the folks at Bureau International des Poids et Mesures / International Bureau of
Weights and Measures (BIPM):

http://www.bipm.fr/fra/5_Scientific/c_time/time_server.html

"Le temps universel coordonné (UTC) est la base légale de l'heure dans le
monde. ..."

i.e. the French would be "TUC".

or the English page at http://www.bipm.fr/enus/5_Scientific/c_time/time_server.html

"Coordinated Universal Time (UTC) is the basis for legal time worldwide
and follows TAI (see below) exactly except for an integral number of seconds,
presently 32. These leap seconds are inserted on the advice of the
International Earth Rotation Service (IERS) (http://hpiers.obspm.fr) to ensure
that, on average over the years, the Sun is overhead within 0.9 seconds of
12:00:00 UTC on the meridian of Greenwich. UTC is thus the modern
successor of Greenwich Mean Time, GMT, which was used when the unit of
time was the mean solar day."

___
Paul Sture
Switzerland


paddy....@zzz.tg.nsw.gov.au

unread,
Oct 14, 2000, 3:00:00 AM10/14/00
to
John Laird wrote:

> I presume Zulu time is not politically correct any longer ? ;-)

I'm not sure (if you mean the word Zulu itself -- what is Zulu time?) why it
should not be correct. The Zulus were/are a mighty and proud nation (from my
reading of history), so I cannot see why that should be deemed derogatory as are
considered black/nigger, etc.

Regards, Paddy

Paddy O'Brien,
Transmission Development,
TransGrid,
PO Box A1000, Sydney South,
NSW 2000, Australia

Tel: +61 2 9284-3063
Fax: +61 2 9284-3050
Email: paddy.o'br...@zzz.tg.nsw.gov.au

Either "\'" or "\s" (to escape the apostrophe) seems to work for most people,
but that little whizz-bang apostrophe gives me little spam.

John Laird

unread,
Oct 15, 2000, 3:00:00 AM10/15/00
to
On Sat, 14 Oct 2000 19:16:21 +0010, paddy.o'br...@zzz.tg.nsw.gov.au
wrote:

>John Laird wrote:
>
>> I presume Zulu time is not politically correct any longer ? ;-)
>
>I'm not sure (if you mean the word Zulu itself -- what is Zulu time?) why it
>should not be correct. The Zulus were/are a mighty and proud nation (from my
>reading of history), so I cannot see why that should be deemed derogatory as are
>considered black/nigger, etc.

Zulu time is used by aircraft, mostly (as they have the greatest
difficulty with time zones). It is GMT, as you might expect.

It may not be derogatory, but there is still an ethnic slant, and as the
world clearly didn't want to carry on referring to a small part of
South-East London, I'd presumed they would not be very happy with the
Z-word either ;-)

John
--
John Laird

Paul Sture

unread,
Oct 15, 2000, 3:00:00 AM10/15/00
to
In article <to6juscmpkujank8q...@4ax.com>, John Laird wrote:
> From: John Laird <jo...@laird-towers.freeserve.co.uk>

> Newsgroups: comp.os.vms
> Subject: Re: SYS$ASCUTC
> Date: Sun, 15 Oct 2000 12:58:41 +0100
Aw c'mon. Let's see which others out of the list we ought to kill:

Alpha, Bravo, Charlie, Delta, Echo, Foxtrot, Golf, Hotel, India, Juliet, Kilo, Lima,
Mike, November, Oscar, Papa, Quebec, Romeo, Sierra, Tango, Uniform, Victor, Whiskey,
X-ray, Yankee, Zulu.

By similar reasoning, there go India, Lima, Quebec, Yankee as well. I dunno about
Sierra. Overdominated by male names too...

Gimme a break.
___
Paul Sture
Switzerland


Brian Tillman

unread,
Oct 17, 2000, 3:00:00 AM10/17/00
to
>In article <4prdusskun7p411ua...@4ax.com>, John Laird
<jo...@laird-towers.freeserve.co.uk> >writes:

>>
>> I presume Zulu time is not politically correct any longer ? ;-)
>>
>
>Still in use in all civilian air traffic control.

And on JAG on Tuesday evening.
--
Brian Tillman Internet: tillman_brian at si.com
Smiths Industries, Inc. tillman at swdev.si.com
3290 Patterson Ave. SE, MS Addresses modified to prevent
Grand Rapids, MI 49512-1991 SPAM. Replace "at" with "@"
This opinion doesn't represent that of my company

Paul Repacholi

unread,
Nov 5, 2000, 3:00:00 AM11/5/00
to
A.G...@virgin.net (Alan Greig) writes:


> Internet time servers based at Greenwich. They claimed that existing
> US time servers were based on atomic time in the US and that
> additional round trip time meant that synching with US servers would
> leave you around 1/2 second behind GMT.

Oh sigh... Funn things Pollies!

But, there is a detail in there, sort of.

Because of leap seconds, there is not way to calculate the
interval between 2 UTC points without a load od external
state. ( when Leap-Seconds happened )

TAI does not have this problem.
--
Paul Repacholi 1 Crescent Rd.,
+61 (08) 9257-1001 Kalamunda.
West Australia 6076
Raw, Cooked or Well-done, it's all half baked.

0 new messages