Handling Multiple Timezones in Python

Sdílet
Vložit
  • čas přidán 8. 09. 2024
  • Today we learn how to handle multiple timezones in Python using pytz.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine...
    💻 The Algorithm Bible Book: www.neuralnine...
    👕 Programming Merch: www.neuralnine...
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine...
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/Neu...
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/

Komentáře • 17

  • @stultuses
    @stultuses Před 2 lety +5

    These videos are really practical
    They represent concepts that you'd have to dig around to gather examples on but instead you wrap them up in good examples

  • @Fanta666
    @Fanta666 Před rokem

    THANK YOU! I was really struggling to do some timezone conversions and couldnt figure out why I was getting such weird results (the minutes were changing too). This method worked for me!

  • @vladepast4936
    @vladepast4936 Před rokem

    buddy, this is the best tutorial on the TZ and DT objekt in youtube! Thank you for the video! Gret job!

  • @rohitkumarchoudhary6791

    Nicely explained. very clear with examples.

  • @omarcrosby
    @omarcrosby Před rokem

    Thank you so much for this.

  • @aldairgomez5654
    @aldairgomez5654 Před rokem

    Thanks dude

  • @QueryTuner
    @QueryTuner Před 2 lety +1

    DST should be Daylight Saving Time

  • @CWShuva
    @CWShuva Před rokem

    import datetime as dt
    import pytz
    time_st ="13:00"
    from_zone = pytz.timezone("Etc/GMT")
    to_zone = pytz.timezone('Asia/Kolkata')
    time_utc = dt.datetime.strptime(time_st, '%H:%M')
    local_utc = from_zone.localize(time_utc,is_dst=True)
    new_time = local_utc.astimezone(to_zone)
    print(time_utc.strftime("%H:%M"))
    print(new_time.strftime("%H:%M"))
    Output:-
    13:00
    18:53
    Expected output:-
    13:00
    18:30
    please if anyone can help

  • @felipealvarez619
    @felipealvarez619 Před 7 měsíci

    Cool bruder

  • @user-ns5gr5oq3t
    @user-ns5gr5oq3t Před 2 lety

    thanks video

  • @TomKnudsen
    @TomKnudsen Před 2 lety

    Trying for the love of all things binary to strip this down to only time. So 2022-04-06 00:29:32.681305+00:00 would become 00:29:32. Any idea?

  • @gx3mz
    @gx3mz Před 2 lety

    This might be useful for backend?

  • @josuev.rrj454
    @josuev.rrj454 Před 11 měsíci

    this works fro my mac?

  • @samuelnqai6037
    @samuelnqai6037 Před 2 lety

    hi @neuralnine do you have a course of buiding a crypto bot like arbitrage bot with two exchanges or pancake swap sniping bot ?

  • @md.assadujjamantuhin2568

    greate video.

  • @gzbin365
    @gzbin365 Před 2 lety

    usefull video

  • @OmarHosam203
    @OmarHosam203 Před 2 lety +1

    Second comment lol