+
{{ reading.relative_timestamp }}
@@ -163,7 +163,7 @@
{{ reading.heart_rate }} bpm
- {{ reading.timestamp.strftime('%I:%M %p') }}
+ {{ reading.local_timestamp.strftime('%I:%M %p') }}
{% endfor %}
@@ -222,7 +222,7 @@
{{ reading.heart_rate }} bpm
- {{ reading.timestamp.strftime('%I:%M %p') }}
+ {{ reading.local_timestamp.strftime('%I:%M %p') }}
{% endfor %}
diff --git a/app/templates/profile.html b/app/templates/profile.html
index 48d8b27..02cc65c 100644
--- a/app/templates/profile.html
+++ b/app/templates/profile.html
@@ -57,6 +57,12 @@
focus:ring-blue-500") }}
+
+ {{ form.timezone.label(class="block text-sm font-medium text-gray-700") }}
+ {{ form.timezone(class="w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500")
+ }}
+
+
{{ form.dark_mode }}
{{ form.dark_mode.label(class="ml-2 text-sm font-medium text-gray-700") }}
diff --git a/migrations/versions/5e5a1b78b966_add_timezone_to_profile_model.py b/migrations/versions/5e5a1b78b966_add_timezone_to_profile_model.py
new file mode 100644
index 0000000..5c0b10b
--- /dev/null
+++ b/migrations/versions/5e5a1b78b966_add_timezone_to_profile_model.py
@@ -0,0 +1,32 @@
+"""Add timezone to Profile model
+
+Revision ID: 5e5a1b78b966
+Revises: 59097bee8942
+Create Date: 2024-12-28 00:46:52.941616
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = '5e5a1b78b966'
+down_revision = '59097bee8942'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('profile', schema=None) as batch_op:
+ batch_op.add_column(sa.Column('timezone', sa.String(length=50), nullable=True))
+
+ # ### end Alembic commands ###
+
+
+def downgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('profile', schema=None) as batch_op:
+ batch_op.drop_column('timezone')
+
+ # ### end Alembic commands ###
diff --git a/requirements.txt b/requirements.txt
index c0d8f5c..cee4eec 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -24,6 +24,7 @@ packaging==24.2
pillow==11.0.0
psycopg2==2.9.10
psycopg2-binary==2.9.10
+pytz==2024.2
SQLAlchemy==2.0.36
typing-extensions==4.12.2
werkzeug==3.1.3