FSXTim Posted May 27, 2012 Share Posted May 27, 2012 (edited) 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 May 27, 2012 by Guest Link to comment
Castillo Posted May 27, 2012 Share Posted May 27, 2012 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
FSXTim Posted May 27, 2012 Author Share Posted May 27, 2012 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
Castillo Posted May 27, 2012 Share Posted May 27, 2012 I don't understand what do you mean. Link to comment
Alpha Posted May 27, 2012 Share Posted May 27, 2012 hours = hours + 8 if hours > 24 then hours = hours - 24 end guiSetText(uhrzeitText5, ""..(hours)..":"..minutes.."") Link to comment
FSXTim Posted May 27, 2012 Author Share Posted May 27, 2012 @Solidsnake14 I mean the time difference between different countries. @Alpha: Thanks, sir! That's working. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now