0

Timestamp vs. Datetime , which is better and what to use?

I’d personally go with timestamp all the time, for its accuracy, power, functions and the automatic timezone conversion by MySQL when entering and reading its value. Everything server time. Datetime stores only the ‘date’ value, much like 1st January 2014 , which very much has no function or meaning but behave like TEXT, a statement.

 

How to convert MySQL time to UNIX timestamp using PHP?

$timestamp = strtotime($mysqltime); (where $mysqltime is the timestamp data read from mysql)
echo date("Y-m-d H:i:s", $timestamp); (then use this to display nicely in date format)


when reading from datebase .. and formatting to show .. either use $timestamp  == UNIX_TIMESTAMP(datetime) , then in PHP.. date(‘Y-m-d H:i:s T’,$timestamp) *OR* use in PHP, $timestamp = strtotime(datetime) before date(‘Y-m-d H:i:s T’,$timestamp). Remember to compare with database value with the above date() format for accuracy.

 

the first timestamp field in a table, is automatically updated on a record change!

Something to consider though, DATETIME can store dates from 1000 AD to 9999 AD, while Timestamp, 1970 AD to 2038 AD only:

The DATETIME type is used when you need values that contain both date and time information. MySQL retrieves and displays DATETIME values in ‘YYYY-MM-DD HH:MM:SS’ format. The supported range is ‘1000-01-01 00:00:00’ to ‘9999-12-31 23:59:59’.

The TIMESTAMP data type has a range of ‘1970-01-01 00:00:01’ UTC to ‘2038-01-09 03:14:07’ UTC. It has varying properties, depending on the MySQL version and the SQL mode the server is running in.

Reference:

http://stackoverflow.com/questions/409286/datetime-vs-timestamp

facebooktwittergoogle plus


0

Song: Pretty Old Song

The new piece is a 6/8, and unlike the other 3/4 6/8 songs, this time I change the time signature in Cubase to 6/8 , as I am using Addictive Drums for drum ideas, and it seems to read 6/8 Midi better than 4/4 , which means when I play my piano on the 6/8 program, it fits into place properly. Chords start at the start of bars when using 6/8 , but when using 4/4, chords can appear on the 3rd or 2nd beat, not very ideal if I’m going to start building the track. So I chose 6/8 to build the track nicely as I am starting from scratch.

When time signature is 6/8, no need to use TRIPLET during quantize.. Only during 4/4 signature then you use TRIPLET for such signatures.

facebooktwittergoogle plus



0

How to fix Problem with Shortcut for STEAM.lnk that Spectrasonics use?

The STEAM.link file is usually stored in:

C:ProgramDataSpectrasonics

And can be modified to point to where your data files are. This allows you to separate your boot drive and your audio files efficiently on different disks.

Sometimes however, as Windows automatically rename your disks, you may have difficulties using the VST. Therefore, either use a reboot to fix the disk names, or edit the STEAM.lnk file to point to the right directory or drive.

facebooktwittergoogle plus

0

How to re-sample project from a different bitrate in Cubase 5?

During prompt when it asks to convert, say yes.

 

Do you want to keep the source files in the pool directory?

When it asks to replace, say yes. (and all old projects are gone, hit NO if you want old projects to work)

 

Do you want to keep audio events at their sample positions?

When it asks about position, say no *OR* hit ‘YES’ listen, then UNDO from the Edit menu if not correct.

facebooktwittergoogle plus

0

Song: 20girls dance song

Original song was 124bpm.. i wanted something longer.. so changed to 122bpm.

 

Stage 1: after finishing.. go through each MIDI track and recall the stuffs done and write them down here.

  • Wrote the song with F, C, G, Am chords
  • Nexus DR Downlifter Kicks 1 are cool for ending a song.. esp oct +2 c1 on novation.
  • Lay the intro drum beats. (Nexus)
  • Now the sweeps and noises and winds.
  • Some good omnisphere sweets: club noise 1 for short raise, danish noizweep up for rising sweep (rise)
  • Downsweep prologue to use LP bandpass cutoff, automate downwards.
  • Long rise sweep – omnisphere roadrunner
  • Chorus nexus pad, to adjust mod wheel values, go to Nexus > Mod > pb range + and -.
  • Clap sound from LOL Erock method.
  • Explosion sound from Nexus > XP Drums SIngles > DR Downlifter Kicks 1 > with HP filter.
  • the chorus Nexus SAW Pad is a pb-range- of 31. the downslope gradient modwheel is drawn using the LINE tool.
  • Using a lot of sidechain to make space for my lovely KICK out.
  • Guitar: Always add a X-noise mono to guitar track to clean it up, HP the tracks to make space for bass and kick as you work.
  • A lot of prologues (instruments) were use for the rise and down sweeps..
  • Bounce to rough_bounce
  • Unload to rough_unloaded
  • Recording demo vocals for china in rough_demo_vocals
facebooktwittergoogle plus