SHARE
TWEET

Untitled

a guest Jun 26th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sqlite3
  2. import datetime
  3. import pytz
  4. from tzlocal import get_localzone
  5.  
  6. db = sqlite3.connect("tztestings.sqlite", detect_types=sqlite3.PARSE_DECLTYPES)
  7. db.execute("CREATE TABLE IF NOT EXISTS accounts (name TEXT PRIMARY KEY NOT NULL, balance INTEGER NOT NULL)")
  8. db.execute("CREATE TABLE IF NOT EXISTS history (time TIMESTAMP NOT NULL, timediff TZINFO,"
  9.            " account TEXT NOT NULL, amount INTEGER NOT NULL, PRIMARY KEY (time, account))")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top