On a slightly related note, I have code for UTC+0 to unix time stamp.https://github.com/Devisualization/util/blob/b9ab5758e755c4e33832ac4aed0a5d7f2c728faf/source/core/devisualization/util/core/time.d
Unix timestamps can be negative, so you should probably be using longs instead of ulongs.