SCOUG-Programming Mailing List Archives
Return to [ 12 |
February |
2004 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
Steven Levine wrote:
>
> Warp provides DosGetDateTime
Thanks, Steven! For lurkers, here's what you get back:
typedef struct _DATETIME
{
UCHAR hours; /* 0..23 */
UCHAR minutes; /* 0..59 */
UCHAR seconds; /* 0..59 */
UCHAR hundredths; /* 0..99, 1/100 s */
UCHAR day; /* 0..31 */
UCHAR month; /* 0..12 */
USHORT year;
SHORT timezone; /* Difference in minutes between current time zone */
/* and GMT. >0 = west of Greenwich, -1 = undefined */
/* time zone. */
UCHAR weekday; /* 0..6 0=Sunday */
} DATETIME, *PDATETIME;
I need a simple little command line utility
which calls DosGetDateTime and then displays
the "SHORT timezone" value above.
It's about time I learned C, yes? Okay, here we
go -- let's see how many errors I can create:
timezone.c
----------
#include
define SHORT rc;
rc = DosGetDateTime;
call fprint (_DATETIME.timezone); (or is it printf?)
end;
No compiler here so I can't test it.
But somebody tell me: how's it look?
- Peter
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 12 |
February |
2004 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|