show dates everywhere with user timezone
This commit is contained in:
parent
12eccde4ea
commit
16dfe7bfb2
5 changed files with 5 additions and 2 deletions
|
|
@ -40,6 +40,7 @@ pub mod content {
|
||||||
pub email: Option<String>,
|
pub email: Option<String>,
|
||||||
pub timezone: String,
|
pub timezone: String,
|
||||||
pub list_timezones: Vec<&'static str>,
|
pub list_timezones: Vec<&'static str>,
|
||||||
|
pub updated_at: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ pub async fn user_settings_personal(
|
||||||
email: user.email().map(String::from),
|
email: user.email().map(String::from),
|
||||||
timezone: user.timezone().into(),
|
timezone: user.timezone().into(),
|
||||||
list_timezones: timezones,
|
list_timezones: timezones,
|
||||||
|
updated_at: user.updated_at().to_string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
Ok(flash
|
Ok(flash
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="sort-creation-date" data-date='{{ app.created_at | date(format="%s") }}'>
|
<td class="sort-creation-date" data-date='{{ app.created_at | date(format="%s") }}'>
|
||||||
{{ app.created_at | date() }}
|
{{ app.created_at | date(format="%F", timezone=user.zoneinfo | default(value="UTC")) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="sort-id">{{ app.id }}</td>
|
<td class="sort-id">{{ app.id }}</td>
|
||||||
<td class="sort-confidentiality">
|
<td class="sort-confidentiality">
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="mt-4 text-muted">Settings last updated on {{ updated_at | date(format="%A %-d %B %Y") }}</p>
|
<p class="mt-4 text-muted">Settings last updated on {{ updated_at | date(format="%A %-d %B %Y, %T", timezone=user.zoneinfo | default(value="UTC")) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Save -->
|
<!-- Save -->
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p class="mt-4 text-muted">Profile last updated on {{ updated_at | date(format="%A %-d %B %Y, %T", timezone=user.zoneinfo | default(value="UTC")) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer text-end">
|
<div class="card-footer text-end">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue