欧洲/巴黎-> CET;亚洲/香港-> HKT;欧洲/莫斯科-> MSK

时间:2018-12-15 16:25:37

标签: python-3.x

我如何在python3中将“ timmezones”转换为“人类可读”格式?

即:

Europe/Paris -> CET;
Asia/Hong_Kong- > HKT;
Europe/Moscow -> MSK

非常感谢您提供任何反馈意见。

2 个答案:

答案 0 :(得分:2)

do

答案 1 :(得分:0)

<script>

  var elements = [];
  elemLeft = canvas.offsetLeft,
  elemTop = canvas.offsetTop;


  var canvas = document.getElementById("myCanvas");
  var context = canvas.getContext("2d");

  elements.push({
      colour: '#112F41',
      x:200,
      y:240,
      r:100,
      sAngle:0,
      eAngle:2 * Math.PI
  });

  elements.forEach(function(element) {
      context.strokeStyle = element.colour;
      context.arc(element.x, element.y, element.r, element.sAngle, element.eAngle);
      context.lineWidth = 20;

      context.stroke();
  });

  canvas.addEventListener('click', function(event) {
    var x = event.pageX - elemLeft,
        y = event.pageY - elemTop;
    console.log(x, y);
    elements.forEach(function(element) {
        //??????
    });

}, false);

</script>