Hướng dẫn get timezone python - lấy trăn múi giờ

Xem thảo luận

Nội dung chính ShowShow

  • Bàn luận
  • localtime () - nó giúp có được thời gian địa phương hiện tại
  • Làm thế nào để tôi có được thời gian chính xác trong Python?
  • Làm thế nào để tôi có được thời gian UTC hiện tại trong Python?
  • Timezone bây giờ () trở lại là gì?
  • DateTime DateTime có phải không () UTC?

Cải thiện bài viết

Lưu bài viết

  • Đọc
  • Bàn luận
  • Xem thảo luận

    Cải thiện bài viết

    Lưu bài viết

    Đọc
    In order to get the current time of different time zones, we will be using the

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    5 python library.

    Bàn luận

    localtime () - nó giúp có được thời gian địa phương hiện tại

    • Làm thế nào để tôi có được thời gian chính xác trong Python? – it helps to get the current local time
    • Làm thế nào để tôi có được thời gian UTC hiện tại trong Python? – it helps to decide the format of the time to be used to display the time

    localtime () - nó giúp có được thời gian địa phương hiện tại

    Làm thế nào để tôi có được thời gian chính xác trong Python?

    • Làm thế nào để tôi có được thời gian UTC hiện tại trong Python? – it helps to get the standard UTC time zone
    • Timezone bây giờ () trở lại là gì? – it helps to get the time zone of a particular location
    • DateTime DateTime có phải không () UTC? – it helps to get the date, time, utc standard in default format
    • Cải thiện bài viết – it helps to convert the time of a particular time zone into another time zone

    Examples:

    Lưu bài viết

    Đọc

    ĐọcIn order to get the current time of different time zones, we will be using the

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    5 python library.

    Timezone được định nghĩa là một khu vực hoặc khu vực địa lý trong suốt thời gian tiêu chuẩn được quan sát. Về cơ bản nó đề cập đến thời gian địa phương của một khu vực hoặc quốc gia. Hầu hết các múi giờ được bù đắp từ thời gian phối hợp (UTC), tiêu chuẩn thế giới đối với múi giờ. Trong đơn đặt hàng để có thời gian hiện tại của các múi giờ khác nhau, chúng tôi sẽ sử dụng thư viện
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    5 Python.

    Output:

    11:58:19
    

    Làm thế nào để có được thời gian hiện tại? – it helps to get the current local time
    Examples:

    Để có được thời gian địa phương, chúng ta có thể sử dụng mô -đun thời gian. Một số chức năng quan trọng của mô -đun thời gian – it helps to decide the format of the time to be used to display the time

    Strftime (Hồi%H H:%M:%S, t) - Nó giúp quyết định định dạng thời gian được sử dụng để hiển thị thời gian

    Làm thế nào để có được thời gian hiện tại trong các khu vực khác nhau? – it helps to get the standard UTC time zone

    Để có được thời gian hiện tại của một múi giờ cụ thể, cần phải sử dụng thư viện Python

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    5. Một số lệnh quan trọng của thư viện PYTZ là – it helps to get the time zone of a particular location

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    52
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    53
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    54

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    56

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    52
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    59
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    54

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    52

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    3
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    5
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    52
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    58
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    59

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    81
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    82
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    83

    UTC - Nó giúp có được múi giờ UTC tiêu chuẩn – it helps to get the date, time, utc standard in default format

    timezone () - nó giúp có được múi giờ của một địa điểm cụ thể – it helps to convert the time of a particular time zone into another time zone

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    92
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    82
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    83

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    

    Bây giờ () - nó giúp có được ngày, thời gian, tiêu chuẩn UTC ở định dạng mặc định
    Examples:

    Để có được thời gian địa phương, chúng ta có thể sử dụng mô -đun thời gian. Một số chức năng quan trọng của mô -đun thời gian – it helps to decide the format of the time to be used to display the time

    Strftime (Hồi%H H:%M:%S, t) - Nó giúp quyết định định dạng thời gian được sử dụng để hiển thị thời gian

    Làm thế nào để có được thời gian hiện tại trong các khu vực khác nhau? – it helps to get the standard UTC time zone

    Để có được thời gian hiện tại của một múi giờ cụ thể, cần phải sử dụng thư viện Python

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    5. Một số lệnh quan trọng của thư viện PYTZ là – it helps to get the time zone of a particular location

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    3
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    5
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    6
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    8
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    9
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    50

    timezone () - nó giúp có được múi giờ của một địa điểm cụ thể – it helps to convert the time of a particular time zone into another time zone

    Bây giờ () - nó giúp có được ngày, thời gian, tiêu chuẩn UTC ở định dạng mặc định

    astimezone () - Nó giúp chuyển đổi thời gian của một múi giờ cụ thể thành múi giờ khác

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    8
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    9

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    04
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    8
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    9
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    08

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    09
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    8
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    12
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    50

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    14
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    8
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    17
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    50

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    19
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    8
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    22
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    50

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    24
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    8
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    27
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    50

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    29
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    01
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    02
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    04
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    05
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    07
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    52
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    31
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    50
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    34
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    35
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    36

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    6

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    38
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    59

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    41
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    35
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    83
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    56
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    35
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    36

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    38
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    59

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    41
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    35
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    83
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    67
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    35
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    36

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    38
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    59

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    41
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    35
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    83
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    5
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    78
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    35
    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    36

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
    IST in Default Format :  2020-03-31 12:45:59.692642+05:30
    Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
    Date & Time in IST :  2020:03:31 12:45:59 IST+0530
    
    38
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    59

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    55

    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    0
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    1
    Output:
    UTC Format               IST Format
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
    
    2Examples:
    • Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      14
      Output:
      UTC Format               IST Format
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      
      1
      Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      16
    • Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      17
      Output:
      UTC Format               IST Format
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      
      1
      Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      19
    • Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      20
      Output:
      UTC Format               IST Format
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      
      1
      Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      22
    • Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      23
      Output:
      UTC Format               IST Format
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      
      1
      Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      25
    • Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      26
      Output:
      UTC Format               IST Format
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      2020-03-31 11:21:13 UTC +0000       2020-03-31 16:51:13 IST +0530
      
      1
      Output:
      UTC in Default Format :  2020-03-31 07:15:59.640418+00:00
      IST in Default Format :  2020-03-31 12:45:59.692642+05:30
      Date & Time in UTC :  2020:03:31 07:15:59 UTC+0000
      Date & Time in IST :  2020:03:31 12:45:59 IST+0530
      
      28

    Ngoài mô-đun DateTime (), mô-đun thời gian là một cách tích hợp khác để có thời gian hiện tại trong Python.Như thường lệ, bạn phải nhập mô -đun thời gian trước và sau đó bạn có thể sử dụng phương thức ctime () để có được ngày và thời gian hiện tại.import the time module first, and then you can use the ctime() method to get the current date and time.import the time module first, and then you can use the ctime() method to get the current date and time.

    Múi giờ.bây giờ () hữu ích.Hàm này trả về ngày và thời gian hiện tại dưới dạng DateTime ngây thơ khi uses_tz = false và dưới dạng dữ liệu nhận thức khi uses_tz = true.Bạn có thể thêm hoặc trừ DateTime.the current date and time as a naive datetime when USE_TZ = False and as an aware datetime when USE_TZ = True . You can add or subtract datetime.the current date and time as a naive datetime when USE_TZ = False and as an aware datetime when USE_TZ = True . You can add or subtract datetime.

    Nhận dấu thời gian UTC sử dụng DateTime.DateTime.now () để có được ngày và thời gian hiện tại.Sau đó sử dụng lớp TZINFO để chuyển đổi DateTime của chúng tôi thành UTC.Use the datetime.datetime.now() to get the current date and time. Then use tzinfo class to convert our datetime to UTC.Use the datetime. datetime. now() to get the current date and time. Then use tzinfo class to convert our datetime to UTC.