Danke schon mal für eure Hilfe.

Code: Alles auswählen
python "dateipfad"
Code: Alles auswählen
x = input("Geschaetzte Stundenzahl(0-23) in Seoul: ")
y = input("Geschaetzte Minutenzahl(0-59) in Seoul: ")
z = int(x)*60 + int(y)
zD = z + 420
if zD < 1440:
pass
else:
zD = zD - 1440
zS = zD//60
zM = zD%60
if zM<10:
zM = "0"+str(zM)
t = str(zS) + ":" + str(zM)
print("Ankunftszeit in Deutschland: " + str(t))
Code: Alles auswählen
x = input("Geschaetzte Stundenzahl(0-23) in Seoul: ")
y = input("Geschaetzte Minutenzahl(0-59) in Seoul: ")
z = int(x)*60 + int(y)
zD = z + 420
if zD >= 1440:
zD = zD - 1440
zS = zD//60
zM = zD%60
print("Ankunftszeit in Deutschland: {}:{:02d}".format(zS,zM))
Code: Alles auswählen
stunden_seoul = input("Geschaetzte Stundenzahl(0-23) in Seoul: ")
minuten_seoul = input("Geschaetzte Minutenzahl(0-59) in Seoul: ")
minuten_gesamt_seoul = int(stunden_seoul)*60 + int(minuten_seoul)
minuten_gesamt_berlin = minuten_gesamt_seoul + 420
if minuten_gesamt_berlin >= 1440:
minuten_gesamt_berlin -= 1440
stunden_berlin, minuten_berlin = divmod(minuten_gesamt_berlin, 60)
print("Ankunftszeit in Deutschland: {}:{:02d}".format(stunden_berlin, minuten_berlin))
Code: Alles auswählen
from datetime import datetime as DateTime, timedelta as TimeDelta
import pytz
flugzeit = TimeDelta(hours=15)
zeitzone_berlin = pytz.timezone('Europe/Berlin')
zeitzone_seoul = pytz.timezone('Asia/Seoul')
uhrzeit_seoul = input("Startzeit in Seoul (HH:MM): ")
uhrzeit_seoul = zeitzone_seoul.localize(DateTime.strptime(uhrzeit_seoul, '%H:%M'))
uhrzeit_berlin = uhrzeit_seoul.astimezone(zeitzone_berlin) + flugzeit
print("Ankunftszeit in Deutschland: {:%H:%M} Uhr".format(uhrzeit_berlin))