Hi Scott,

<< Is there a way in REBOL/Core to set an environment variable?  I want to
set TZ so I can easily get the time and date of various places around
the world. >>

Not in Core. With Command or View/Pro, I just whacked this up. 

lib:  load/library %msvcrt.dll

get-env: make routine! [
    varname [string!]
    return: [string!]
] lib "getenv"

put-env: make routine! [
    env-string [string!]
    return:    [integer!]
] lib "_putenv"

remove-env-var: func [name [string!]] [put-env join name "="]

tz-set: make routine! [
    return:    [integer!]
] lib "_tzset"

print get-env "path"
print get-env "lib"
print get-env "temp"
print get-env "test"

if 0 <> put-env "test=blah" [
    print "error writing environment variable"
]
print get-env "test"

print get-env "TZ"
tz-set

free lib

halt

HTH!

--Gregg
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to