fix: datetime format

main
beiyanpiki 1 year ago
parent 3f5a548689
commit 8d6b4013ec

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

After

Width:  |  Height:  |  Size: 30 KiB

@ -3,7 +3,7 @@
"name": "\u6a2a\u7a7a\u51fa\u4e16 \u8d6b",
"set_id": "CSM1aC",
"symbol": "CSM1aC",
"release_date": "2022-10-28T00:00:00",
"release_date": "2022-10-28T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -9497,7 +9497,7 @@
"name": "\u6a2a\u7a7a\u51fa\u4e16 \u82cd",
"set_id": "CSM1bC",
"symbol": "CSM1bC",
"release_date": "2022-10-28T00:00:00",
"release_date": "2022-10-28T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -18556,7 +18556,7 @@
"name": "\u6a2a\u7a7a\u51fa\u4e16 \u6cfd",
"set_id": "CSM1cC",
"symbol": "CSM1cC",
"release_date": "2022-10-28T00:00:00",
"release_date": "2022-10-28T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -27961,7 +27961,7 @@
"name": "\u8d77\u59cb\u5361\u7ec4 \u6a2a\u7a7a\u51fa\u4e16GX",
"set_id": "CSM1DC",
"symbol": "CSM1DC",
"release_date": "2022-10-28T00:00:00",
"release_date": "2022-10-28T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -41982,7 +41982,7 @@
"name": "\u8389\u8389\u827e\u7684\u58f0\u63f4\u4e13\u5c5e\u793c\u76d2",
"set_id": "CSMLC",
"symbol": "CSMLC",
"release_date": "2022-11-11T00:00:00",
"release_date": "2022-11-11T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -42215,7 +42215,7 @@
"name": "\u5bf9\u6218\u7cbe\u82f1",
"set_id": "CSM1.5C",
"symbol": "CSM1.5C",
"release_date": "2022-12-16T00:00:00",
"release_date": "2022-12-16T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -45761,7 +45761,7 @@
"name": "\u4f0a\u5e03GX\u5957\u88c5\u793c\u76d2",
"set_id": "CSMYC",
"symbol": "CSMYC",
"release_date": "2023-01-06T00:00:00",
"release_date": "2023-01-06T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -46240,7 +46240,7 @@
"name": "\u8d77\u59cb\u5361\u7ec4 \u4ea4\u76f8\u8f89\u6620GX",
"set_id": "CSM2DC",
"symbol": "CSM2DC",
"release_date": "2023-01-18T00:00:00",
"release_date": "2023-01-18T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -60892,7 +60892,7 @@
"name": "\u4ea4\u76f8\u8f89\u6620 \u6c90",
"set_id": "CSM2aC",
"symbol": "CSM2aC",
"release_date": "2023-01-18T00:00:00",
"release_date": "2023-01-18T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -69772,7 +69772,7 @@
"name": "\u4ea4\u76f8\u8f89\u6620 \u9b41",
"set_id": "CSM2bC",
"symbol": "CSM2bC",
"release_date": "2023-01-18T00:00:00",
"release_date": "2023-01-18T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -78417,7 +78417,7 @@
"name": "\u4ea4\u76f8\u8f89\u6620 \u5524",
"set_id": "CSM2cC",
"symbol": "CSM2cC",
"release_date": "2023-01-18T00:00:00",
"release_date": "2023-01-18T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -87147,7 +87147,7 @@
"name": "\u7cbe\u7075\u7403\u793c\u76d2\uff1a\u95ea\u8000\u5b9d\u53ef\u68a6",
"set_id": "CSMJC",
"symbol": "CSMJC",
"release_date": "2023-03-17T00:00:00",
"release_date": "2023-03-17T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -87947,7 +87947,7 @@
"name": "\u70ab\u5947\u4e89\u80dc",
"set_id": "CSM2.5C",
"symbol": "CSM2.5C",
"release_date": "2023-03-17T00:00:00",
"release_date": "2023-03-17T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": true,
"cards": [
@ -92257,7 +92257,7 @@
"name": "\u963f\u5c14\u5b99\u65af&\u5e1d\u7259\u5362\u5361&\u5e15\u8def\u5947\u4e9aGX \u5361\u7ec4\u6784\u7b51\u8fdb\u9636\u793c\u76d2",
"set_id": "CSMAC",
"symbol": "CSMAC",
"release_date": "2023-03-17T00:00:00",
"release_date": "2023-03-17T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -92886,7 +92886,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u5956\u8d4f\u5305",
"set_id": "CSMPiC",
"symbol": "CSMPiC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -94671,7 +94671,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u94a2",
"set_id": "CSMPhC",
"symbol": "CSMPhC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -95454,7 +95454,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u6076",
"set_id": "CSMPgC",
"symbol": "CSMPgC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -96167,7 +96167,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u6597",
"set_id": "CSMPfC",
"symbol": "CSMPfC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -96863,7 +96863,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u8d85",
"set_id": "CSMPeC",
"symbol": "CSMPeC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -97547,7 +97547,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u96f7",
"set_id": "CSMPdC",
"symbol": "CSMPdC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -98181,7 +98181,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u6c34",
"set_id": "CSMPcC",
"symbol": "CSMPcC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -98976,7 +98976,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u706b",
"set_id": "CSMPbC",
"symbol": "CSMPbC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -99746,7 +99746,7 @@
"name": "\u5bf9\u6218\u6d3e\u5bf9\u7ec4\u5408 \u8349",
"set_id": "CSMPaC",
"symbol": "CSMPaC",
"release_date": "2023-04-15T00:00:00",
"release_date": "2023-04-15T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -100477,7 +100477,7 @@
"name": "\u6781\u5de8\u4e89\u950b \u5361\u7ec4\u6784\u7b51\u793c\u76d2",
"set_id": "CSAC",
"symbol": "CSAC",
"release_date": "2023-05-19T00:00:00",
"release_date": "2023-05-19T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": false,
"cards": [
@ -101424,7 +101424,7 @@
"name": "\u8d77\u59cb\u5361\u7ec4 \u6781\u5de8\u4e89\u950bV",
"set_id": "CS1DC",
"symbol": "CS1DC",
"release_date": "2023-05-19T00:00:00",
"release_date": "2023-05-19T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": false,
"cards": [
@ -111187,7 +111187,7 @@
"name": "\u6781\u5de8\u4e89\u950b \u7130",
"set_id": "CS1bC",
"symbol": "CS1bC",
"release_date": "2023-05-19T00:00:00",
"release_date": "2023-05-19T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": true,
"cards": [
@ -120308,7 +120308,7 @@
"name": "\u6781\u5de8\u4e89\u950b \u96f7",
"set_id": "CS1aC",
"symbol": "CS1aC",
"release_date": "2023-05-19T00:00:00",
"release_date": "2023-05-19T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": true,
"cards": [
@ -130202,7 +130202,7 @@
"name": "\u6781\u5de8\u653b\u9632",
"set_id": "CS1.5C",
"symbol": "CS1.5C",
"release_date": "2023-06-28T00:00:00",
"release_date": "2023-06-28T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": true,
"cards": [
@ -134169,7 +134169,7 @@
"name": "\u6d53\u58a8\u91cd\u5f69 \u975b",
"set_id": "CS2bC",
"symbol": "CS2bC",
"release_date": "2023-08-18T00:00:00",
"release_date": "2023-08-18T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": true,
"cards": [
@ -140635,7 +140635,7 @@
"name": "\u6d53\u58a8\u91cd\u5f69 \u9ece",
"set_id": "CS2aC",
"symbol": "CS2aC",
"release_date": "2023-08-18T00:00:00",
"release_date": "2023-08-18T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": true,
"cards": [
@ -147255,7 +147255,7 @@
"name": "\u8f89\u91d1\u80fd\u91cf\u793c\u76d2&\u8f89\u91d1\u80fd\u91cf\u8fdb\u9636\u793c\u76d2",
"set_id": "CSM2.1C",
"symbol": "CSM2.1C",
"release_date": "2023-09-09T00:00:00",
"release_date": "2023-09-09T09:00:00Z",
"series": "Sun & Moon",
"main_expansion": false,
"cards": [
@ -148654,7 +148654,7 @@
"name": "\u7480\u74a8\u53cd\u51fb",
"set_id": "CS2.5C",
"symbol": "CS2.5C",
"release_date": "2023-09-29T00:00:00",
"release_date": "2023-09-29T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": true,
"cards": [
@ -158618,7 +158618,7 @@
"name": "\u739b\u4fd0\u7684\u51b3\u5fc3\u4e13\u5c5e\u793c\u76d2",
"set_id": "PROMO-MARNIE",
"symbol": "PROMO",
"release_date": "2023-06-18T00:00:00",
"release_date": "2023-06-18T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": false,
"cards": [
@ -158667,7 +158667,7 @@
"name": "\u55b7\u706b\u9f99VMAX\u6536\u85cf\u5957\u88c5\u793c\u76d2",
"set_id": "PROMO-CharizardA",
"symbol": "PROMO",
"release_date": "2023-08-18T00:00:00",
"release_date": "2023-08-18T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": false,
"cards": [
@ -158734,7 +158734,7 @@
"name": "\u55b7\u706b\u9f99VMAX\u5bf9\u6218\u5957\u88c5\u793c\u76d2",
"set_id": "PROMO-CharizardB",
"symbol": "PROMO",
"release_date": "2023-08-18T00:00:00",
"release_date": "2023-08-18T09:00:00Z",
"series": "Sword & Shield",
"main_expansion": false,
"cards": [

File diff suppressed because one or more lines are too long

@ -1,7 +1,9 @@
from datetime import datetime
import time
from datetime import datetime, timezone
import hashlib
from enum import Enum
from typing import List, Optional
import pytz
class Series(Enum):
@ -336,6 +338,11 @@ class PSet:
self.series = series_id
self.cards = []
if self.release_date is not None:
input_format = "%Y-%m-%dT%H:%M:%S" if 'T' in self.release_date else "%Y-%m-%d"
x = datetime.strptime(self.release_date, input_format).replace(hour=9, minute=0, second=0)
self.release_date = x.isoformat() + 'Z'
if symbol in [
# SM
'CSM1aC', 'CSM1bC', 'CSM1cC', 'CSM1.5C', 'CSM2aC', 'CSM2bC', 'CSM2cC', 'CSM2.5C',
@ -347,10 +354,6 @@ class PSet:
self.set_type = SetType.SideProduct
def __json__(self):
if self.release_date:
input_format = "%Y-%m-%dT%H:%M:%S" if 'T' in self.release_date else "%Y-%m-%d"
self.release_date = datetime.strptime(self.release_date, input_format).isoformat()
return {
'name': self.name,
'set_id': self.set_id,

Loading…
Cancel
Save