Technical issues/questions of an intermediate or advanced nature.
-
Ed_P
- Contributor

- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Post#46
by Ed_P » 11 Feb 2019, 06:36
A script for editing the Simple Weather Indicator's Last Update time clock format.
12to24.sh
Code: Select all
#!/bin/sh
# Change Simple Weather Indicator's Last Update time from 12hr am/pm format to 24 hr clock.
if [ `whoami` != "root" ]; then
echo -e "Enter root's password"
su -c "sh $0 $1"
exit
fi
sed -i.ampm '/Last Update:/s/%I:%M:%S %p/%H:%M:%S/' /usr/lib/ubuntu-indicator-weather/indicator-weather

Ed_P
-
Rava
- Contributor

- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Post#47
by Rava » 18 Feb 2019, 16:22
^
That is a nice way for patching the code. But when someone really wants to have the patched code only, I do recommend creating a patched module. Just my 2 cents.

Cheers!
Yours Rava
Rava