Get Unix time of the time specified by JST regardless of the time zone of the server in Python

import time
import datetime
import pytz
import calendar

int(calendar.timegm(datetime.datetime(2014,11,30,0,0,0,tzinfo=pytz.timezone('Asia/Tokyo')).utctimetuple()))



Recommended Posts

Get Unix time of the time specified by JST regardless of the time zone of the server in Python
Get a datetime instance at any time of the day in Python
Get the caller of a function in Python
Divides the character string by the specified number of characters. In Ruby and Python.
Get the last element of the array by splitting the string in Python and PHP
How to get the number of digits in Python
[python] Get the list of classes defined in the module
Get the size (number of elements) of UnionFind in Python
Get the URL of the HTTP redirect destination in Python
[Python] Open the csv file in the folder specified by pandas
Get the number of specific elements in a python list
Get the current date and time in Python, considering the time difference
Get the index of each element of the confusion matrix in Python
Python> Get a list of files in multiple directories> Use glob | Sort by modification time
Get the value of a specific key up to the specified index in the dictionary list in Python
Get the desktop path in Python
Get the script path in Python
Get the desktop path in Python
Behavior of python3 by Sakura's server
Get the host name in Python
[Understanding in the figure] Management of Python virtual environment by Pipenv
Read the standard output of a subprocess line by line in Python
Hit the New Relic API in Python to get the server status
A function that measures the processing time of a method in python
[python] Get the rank of the values in List in ascending / descending order
Get the title and delivery date of Yahoo! News in Python
Get the number of readers of a treatise on Mendeley in Python
Get the width of the div on the server side with Selenium + PhantomJS + Python
Get a capture of the entire web page in Selenium Python VBA
Get date and time in specified format
How to get the date and time difference in seconds with python
Get JST current time in ISO 8601 notation
The result of installing python in Anaconda
Test & Debug Tips: Create a file of the specified size in Python
Read the file line by line in Python
Read the file line by line in Python
MongoDB for the first time in Python
Get and convert the current time in the system local timezone with python
The basics of running NoxPlayer in Python
Pandas of the beginner, by the beginner, for the beginner [Python]
In search of the fastest FizzBuzz in Python
Get the last day of the specified month
[Python] Get the character code of the file
Get the EDINET code list in Python
[Python] Read the specified line in the file
Get rid of DICOM images in Python
Get the key for the second layer migration of JSON data in python
Compare the sum of each element in two lists with the specified value in Python
A program that sends a fixed amount of mail at a specified time by Python
How to get a list of files in the same directory with python
Get the contents of git diff from python
Output the number of CPU cores in Python
[Python] Get the files in a folder with Python
Get the weather in Osaka via WebAPI (python)
[Python] Sort the list of pathlib.Path in natural sort
[Python] Get / edit the scale label of the figure
[Python] Get the main topics of Yahoo News
Match the distribution of each group in Python
Make a copy of the list in Python
Read the output of subprocess.Popen in real time
Get the X Window System window title in Python