Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- #Earth Time
- seconds = int(time.time()) #seconds since epoch(1200am, Jan 01 1970)
- mins = int (seconds / 60)
- hours = int (mins/ 60)
- days = int (hours / 24)
- years = int (days / 365)
- print("Seconds:",seconds)
- print("Mins:",mins)
- print("Hours:",hours)
- print("Days:",days)
- print("Years:",years)
- #Game Time
- gseconds = int(seconds * 25)
- mincount = int (gseconds / 60)
- hourcount = int(mincount / 60)
- daycount = int (hourcount / 24)
- monthcount = int (daycount / 30) #simplified 30 day month
- yearcount = int(monthcount /12)
- weekcount = int (daycount / 8) #8 day week
- print("DayCount: ",daycount)
- print("MonthCount: ",monthcount)
- print("YearCount: ",yearcount)
- print("WeekCount: ",weekcount)
- ### -- CALC HOUR -- ###
- hour = hourcount%(24)
- print(hour)
- ### -- CALC MIN -- ###
- min = mincount%(60)
- print(min)
- ### -- CALC DAY -- ###
- day = None
- dayremainder = daycount%(8)
- if dayremainder == 0:
- print("Monday")
- day = "Monday"
- elif dayremainder == 1:
- print("Tuesday")
- day = "Tuesday"
- elif dayremainder == 2:
- print("Wednesday")
- day = "Wednesday"
- elif dayremainder == 3:
- print("Thursday")
- day = "Thursday"
- elif dayremainder == 4:
- print("Friday")
- day = "Friday"
- elif dayremainder == 5:
- print("Saturday")
- day = "Saturday"
- elif dayremainder == 6:
- print("Sunday")
- day = "Sunday"
- elif dayremainder == 7:
- print("Newday")
- day = "Newday"
- else:
- print("Default")
- print(dayremainder)
- ### -- CALC MONTH -- ##
- month = None
- monthremainder = monthcount%(12)
- if monthremainder == 0:
- print("January")
- month = "January"
- elif monthremainder == 1:
- print("February")
- month = "February"
- elif monthremainder == 2:
- print("March")
- month = "January"
- elif monthremainder == 3:
- print("April")
- month = "April"
- elif monthremainder == 4:
- print("May")
- month = "May"
- elif monthremainder == 5:
- print("June")
- month = "June"
- elif monthremainder == 6:
- print("July")
- month = "July"
- elif monthremainder == 7:
- print("August")
- month = "August"
- elif monthremainder == 8:
- print("September")
- month = "September"
- elif monthremainder == 9:
- print("October")
- month = "October"
- elif monthremainder == 10:
- print("November")
- month = "November"
- elif monthremainder == 11:
- print("December")
- month = "December"
- else:
- print("Default")
- print(monthremainder)
- season = None
- ### -- CALC SEASON -- ###
- if monthremainder >=11 and monthremainder <=2:
- print("Winter")
- season = "Winter"
- elif monthremainder >=3 and monthremainder <=5:
- print("Spring")
- season = "Spring"
- elif monthremainder >=7 and monthremainder <=8:
- print("Summer")
- season = "Summer"
- elif monthremainder >=9 and monthremainder <=10:
- print("Autumn")
- season = "Autumn"
- else:
- print("Default")
- print(monthremainder)
- print(day, " - ",dayremainder, " - " ,month, " - ", yearcount, " in the ", season, " time.", " It's: ",hour, ":",min)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement