I’ve never played FFXIV – and probably never will, but I was intrigued by the problem:
Eorzea time runs faster than real-time. 60 minutes in Eorzea equates to only 2m 55s on Earth. Calculating Eorzea time therefore seemed a simple case of multiplying the current DateTime by some constant.
The first hurdle I spotted was that I needed to define what I mean by ‘multiply the current date/time’. Do I multiply time since the year 0001? Or do I use epoch time (the time elapsed since 1/1/1970). After some experimentation, I realised that Eorzea time must be based on epoch time.
The Eorzea multipler constant was easy to calculate based on this infomation: 1Bell = 60 minutes = 3600 seconds. On Earth, the equivalent is 2 minutes 55 seconds = 175 seconds. So the multiplier is simply ( 3600 / 175 ).
Here’s the code I ended up writing, which I encapsulated into a DateTime extension method:
public static class EorzeaDateTimeExtention
public static DateTime ToEorzeaTime(this DateTime date)
const double EORZEA_MULTIPLIER = 3600D/175D;
// Calculate how many ticks have elapsed since 1/1/1970
long epochTicks = date.ToUniversalTime().Ticks - (new DateTime(1970, 1, 1).Ticks);
// Multiply those ticks by the Eorzea multipler (approx 20.5x)
long eorzeaTicks = (long)Math.Round(epochTicks * EORZEA_MULTIPLIER);
return new DateTime(eorzeaTicks);
With this in place, you can calculate the current Eorzea time by simply calling:
var eorzeaTimeNow = DateTime.Now.ToEorzeaTime();
or for a specific date and time:
var eorzeaSpecificTime = new DateTime(2014,5,12,5,0,0).ToEorzeaTime();
And that’s that. This code is of no use to me, but hopefully you will find is useful! :)