From 85d663528c32acb359234e620a9bed7deb4ea11c Mon Sep 17 00:00:00 2001
From: Ayaz Badouraly <ayaz.badouraly@via.ecp.fr>
Date: Tue, 13 Dec 2016 01:06:01 +0100
Subject: [PATCH] Updating prompt time format

---
 README.md     | 5 +++++
 via.zsh-theme | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index ba16a31..9676cb5 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,11 @@ You then need to select this theme in your `~/.zshrc` :
 ZSH_THEME="oh-my-via/via"
 ```
 
+### Customization
+
+Time format defaults to `%D{%H:%M}`, but can be overwritten by setting the variable
+`OHMYVIA_TIME_FORMAT` in your `~/.zshrc`.
+
 
 License
 -------
diff --git a/via.zsh-theme b/via.zsh-theme
index 9784d35..14c7ca5 100644
--- a/via.zsh-theme
+++ b/via.zsh-theme
@@ -1,7 +1,8 @@
 # VIA ZSH Theme - Preview: ASAP
 # Fork from the historical VIA Centrale Réseaux ZSH Theme
 
-local clock="%{$fg_bold[cyan]%}%T%{$reset_color%}"
+local time_format=${OHMYVIA_TIME_FORMAT:-"%D{%H:%M}"}
+local clock="%{$fg_bold[cyan]%}$time_format%{$reset_color%}"
 
 # Check the UID
 if [[ $UID -ne 0 ]];
-- 
GitLab