2015-09-20

2015-09-20 Sunday - MySQL Date Handling

In preparation for some API design work I'm doing - to include exposing an API internally, to B2B partners, and potentially to a Developer Community - as well as the challenges of supporting a global deployment of a solution - I'm doing some research today on MySQL date (and timezone) handling...these are the resources I've found relevant...and which may be of interest/use to others...

https://dev.mysql.com/doc/refman/5.7/en/datetime.html

https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html
  • "When the server starts, it attempts to determine the time zone of the host machine and uses it to set the system_time_zone system variable. The value does not change thereafter."
  • "You can set the system time zone for MySQL Server at startup with the --timezone=timezone_name option to mysqld_safe. You can also set it by setting the TZ environment variable before you start mysqld."
  • "The initial global server time zone value can be specified explicitly at startup with the --default-time-zone=timezone option on the command line, or you can use the following line in an option file:"
    • default-time-zone='timezone' 
  • "Per-connection time zones. Each client that connects has its own time zone setting, given by the session time_zone variable. Initially, the session variable takes its value from the global time_zone variable, but the client can change its own time zone with this statement:"
    • mysql> SET time_zone = timezone;
      
  • "The current values of the global and client-specific time zones can be retrieved like this:"
    • mysql> SELECT @@global.time_zone, @@session.time_zone; 
 
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_system_time_zone 
 
http://billauer.co.il/blog/2009/03/mysql-datetime-epoch-unix-time/

*** READ THIS ***
http://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices?rq=1

*** AND THIS ***http://stackoverflow.com/questions/1646171/mysql-datetime-fields-and-daylight-savings-time-how-do-i-reference-the-extra

http://stackoverflow.com/questions/1349280/storing-datetime-as-utc-in-php-mysql

http://dba.stackexchange.com/questions/20217/mysql-set-utc-time-as-default-timestamp


http://stackoverflow.com/questions/19843203/how-to-store-a-datetime-in-mysql-with-timezone-info

  • "You shouldn't want to store time zone info in database. Store all date/time data as UTC and always make time zone offset adjustment on the application layer. –  marekful Nov 7 '13 at 18:00"
http://programmers.stackexchange.com/questions/126208/datetime-vs-timestamp-in-mysql-and-php-in-practice

http://www.webdevelopersdiary.com/blog/good-to-know-how-to-properly-store-date-and-time-values-in-mysql

http://code.openark.org/blog/mysql/timestamp-vs-datetime-which-should-i-be-using 

2015-09-20 Sunday - 2015 Seattle Code Camp - Diagnosing The Patient

The deck for my presentation at the 2015 Seattle Code Camp is posted to slideshare
http://www.slideshare.net/intltechventures/2015-seattle-code-camp-diagnosing-the-patient

2015-09-20 Sunday - Go RESTful Web Services

I'm experimenting with Go 1.5 these days...evaluating it for possible adoption in a major system refactoring / renewal effort.

I'm doing some reading today on resources to leverage in developing RESTful web services in Go.  This posting is a placeholder for information that I find - and which may be of interest / use to others.

https://golang.org

https://github.com/golang/go

http://thenewstack.io/make-a-restful-json-api-go/

http://dougblack.io/words/a-restful-micro-framework-in-go.html 

Go: Simple, Easy, Fast – Building a Go (golang) REST Service with Gorilla
http://www.gorillatoolkit.org/


Creating a REST API using Go (GoLang) and JAS (JSON API Server)
"A simple and powerful REST API framework for Go"
https://github.com/coocood/jas


Creating a REST API using Go (GoLang) and Goweb
"A lightweight RESTful web framework for Go"
https://github.com/stretchr/goweb

http://ernestmicklei.com/2012/11/24/go-restful-first-working-example/
https://github.com/emicklei/go-restful
https://github.com/emicklei/go-restful/blob/master/examples/restful-user-service.go


2015-09-05

2015-09-05 Saturday - ITV Code Generator, v0.8 beta


I spent some time today extending the data model of the ITV_Core product - now up to 112 tables.

I then ran the ITV_Code_Generator tool against that data model, and obtained the following results:

ITV Code Generator, Version, v0.8 beta
copyright 2001-2015, International Technology Ventures, Inc.

Total Tables Processed: 112
Total Files Created:        7,393
Total Lines of Code:       433,372
Run Time:                      Hours: 0  Minutes: 1  Seconds: 56  Milliseconds: 144

The tool is compiled with Java 8, within Eclipse Mars - leveraging a PostgreSQL 9.4 database

I currently have 34 target output language modules identified in scope for the tool.

The goal of the tool is to provide my consulting practice with a proprietary tool and intellectual property assets to accelerate development of custom solutions during client engagements - by eliminating a significant portion of the drudgery of foundational development work - so that more time can be spent on the creative and innovative aspects of design and development efforts.

Copyright

© 2001-2021 International Technology Ventures, Inc., All Rights Reserved.