Jump to content

'getRealTime' Problem


FSXTim

Recommended Posts

Hello,

datum of today: 27.5.2012

the label sais that: 27.4.112

Why?

function setText1() 
    local time1 = getRealTime() 
    local monthday = time.monthday 
    local month = time.month                 
    local year = time.year   
    guiSetText(uhrzeitText2, ""..monthday.."."..month.."."..year.."") 
end 

Greets

Edited by Guest
Link to comment
function setText1 ( ) 
    local time1 = getRealTime ( ) 
    local monthday = time.monthday 
    local month = ( time.month + 1 ) 
    local year = ( time.year + 1900 ) 
    guiSetText ( uhrzeitText2, "".. monthday ..".".. month ..".".. year .."" ) 
end 

P.S: Today is 27, not 25.

Link to comment

Oh yea, you're right.

Thanks!

One more question:

I'm living in Germany and the time difference between Berlin and Sydney are 8 hours.

guiSetText(uhrzeitText5, ""..(hours+8)..":"..minutes.."") 

But now the result it this:

Time in Sydney: 28:46 

But there have to be 4:46

How can I fix it?

Greets

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...