Today I read that Moment.js is now in maintenance mode…
Tag Archives: date
Omitting date completed from MySQL dump file
By default when you run a dump with ‘mysqldump’ the date of the dump is appended to the file, e.g.:
jj5@love:~/desktop/experiment$ udiff * --- dbt__jj_dev_1__svn_jdrepo.1.sql 2019-06-11 18:11:13.267758230 +1000 +++ dbt__jj_dev_1__svn_jdrepo.2.sql 2019-06-11 18:12:03.856075974 +1000 @@ -32,4 +32,4 @@ /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-06-10 21:59:44 +-- Dump completed on 2019-06-10 12:06:49
This causes dumps for a single database that has not changed to have two dumps which differ. It’s better to have dumps from the same unchanged database to be the same. To facilitate that add the –skip-dump-date option when running ‘mysqldump’.
See here for the back-story.
Adding weekday to Date column in Dolphin in KDE on Debian GNU/Linux
cd /usr/share/i18n/locales cp en_AU en_JJ vim en_JJ
Change metadata:
title "English locale for John Elliot V" language "John's English"
And prefix d_fmt with:
d_fmt "<U0025><U0061><U0020>
Then:
sudo localedef -f UTF-8 -i en_JJ en_JJ.UTF-8
Then:
vim /etc/environment
add add:
LC_TIME="en_JJ.UTF-8"
Preserving file modification time in Subversion (svn)
Today I found this thread from which I learned:
svn co --config-option config:miscellany:use-commit-times=yes https://example.com/svn/repo/proj
You can also set the option in your svn config, but you probably don’t want to do that.
PHP DateInterval spec
It was a bit of a trick to find the DateInterval spec hidden away in the constructor doco, not the DateInterval class doco.
Designator | Description |
---|---|
Y | years |
M | months |
D | days |
W | weeks |
H | hours |
M | minutes |
S | seconds |
Formatting timezones in PHP
All you need to know is on the date documentation…
PostgreSQL date/time support
Reading about date/time support in PostgreSQL…
MySQL Date and Time Functions
Looking up the MySQL Date and Time Functions today.
Setting modification time on files in Linux
If you want to change the modification time of a file on Linux, the command you’re looking for is touch. You can use touch with the -r parameter to specify a reference file who’s date and time information will be used as the basis for a new (or existing) file.