如何查找此代码返回的时区时间?是否与托管bitbucket的服务器中设置的时区相同或者是本地时区?如果我在位桶中转到“管理帐户”,则会显示本地时区。
我需要时区,因为我正在将文件与prod服务器进行比较,并且时区需要相同才能比较文件修改时间的时间戳
import sys
import os
from stat import S_IMODE, S_ISDIR, S_ISREG
import pysftp
from glob import glob
import datetime
import shutil
import git
from itertools import izip_longest
import filecmp
import getpass
import argparse
git_url="ssh://git@xxxxx.git"
branch="develop"
repo = git.Repo.clone_from(git_url,git_path,branch=branch, recursive=True)
#Getting time stamp of the folders and files recursively from git
dir_tree=repo.tree()
dict_git_timestamps=dict()
for blob in dir_tree.traverse():
commit=repo.iter_commits(paths=blob.path).next()
dict_git_timestamps[blob.path]=datetime.datetime.fromtimestamp(commit.committed_date).strftime('%Y-%m-%d %H:%M:%S')