Default value of Timezone in Progress 4gl

Hello,

Can anyone clarify about the values of "Timezone" in progress.
Timezone is a reserved keyword in progress.

I have checked it in progress editor its by simply displaying its value.

I would like to know more about it..

Any Help will be appriciated...

N Thanks in advance
 

Casper

ProgressTalk.com Moderator
Staff member
Like online help says:

Returns an INTEGER value representing the time zone offset from Coordinated Universal Time (UTC), in minutes. Use this function together with the STRING function to produce the time in hours, minutes, and seconds.
Note:
Coordinated Universal Time (UTC) is the current universal standard for time. Local time zone values are relative to UTC. For example, Eastern Standard Time is UTC–05:00.

If the TIMEZONE function has no arguments, it returns the client or server machine that serves as the time source for applications running during the ABL session (specified by the TIME-SOURCE attribute).

So you can display your timezone with the following code:
Code:
MESSAGE string(timezone,'HH:MM:SS')
    VIEW-AS ALERT-BOX INFO BUTTONS OK.

Casper
 
Thanks for u r help..

I have a program which sends mails to multiple recipents.
For that mails the sent time is showing wrong for that i wanted to know about timezone.....

if anybody can put some light on this then it will be appriciated..
 

sunilnair

Member
Hi,

for most mail sending programs the time used is the mail server time. ...

from an earlier discussion I think you are using smtpmail.p , is there a parameter in that which lets you set mail sent time .... because without that I dont think this can be done ....

Cheers,
Sunil.
 
smtpcmd = "Date: " + STRING(DAY(TODAY)) + " " +
ENTRY(MONTH(TODAY),cMonth) + " " +
STRING(YEAR(TODAY),"9999") + " " +
STRING(TIME,"hh:mm:ss") + " " + STRING(TIMEZONE) + CHR(13) + CHR(10).

In this line The timestamp is being sent.. so do u think it may cause any problem.

Thanks for reply..
 
I tried by putting "now"..
it is showing Sent time: None

it means in this string only we have to pass timezone also

But dont know where...n how
 

Casper

ProgressTalk.com Moderator
Staff member
What is wrong with the time which is automatically generated with smptmail.p?
But to go ahead with what you are doing:

It appears from the sources code that timezone should have a format of:
Code:
[SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]TRIM[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]STRING[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](tzHours, [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"-99"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:U) + [/SIZE][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]STRING[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](tzMinutes, [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"99"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:U))[/SIZE]
so the format should be either +HHMM or -HHMM depending on the timezone.

Casper.
 
thank u very much for u r answer...
It solved my problem.....

i have used following to get the timezone of current server machine..

DEFINE VARIABLE fststr AS CHARACTER FORMAT "x(25)" NO-UNDO.
DEFINE VARIABLE sndstr AS CHARACTER FORMAT "x(25)" NO-UNDO.

fststr = substring(substring(string(NOW),LENGTH(STRING(NOW)) - 5,6), 1, INDEX(substring(string(NOW),LENGTH(STRING(NOW)) - 5,6),":") - 1).
sndstr = substring(substring(string(NOW),LENGTH(STRING(NOW)) - 5,6), INDEX(substring(string(NOW),LENGTH(STRING(NOW)) - 5,6),":") + 1, 2).
/* Sample format Date: 27 March 2001 10:30:00 EST */
smtpcmd = "Date: " + STRING(DAY(TODAY)) + " " +
ENTRY(MONTH(TODAY),cMonth) + " " +
STRING(YEAR(TODAY),"9999") + " " +
STRING(TIME,"hh:mm:ss") + " " + fststr + sndstr + CHR(13) + CHR(10).

Now the sent time in email sent by this program is correct.:)
 
Top