function getTime(world) {
  world = _world(world);

  if (__plugin.bukkit) {
    return world.time;
  }
  if (__plugin.canary) {
    // there's a bug in canary where if you call world.setTime() the world.totalTime
    // becomes huge.
    if (world.totalTime < world.rawTime) {
      return world.totalTime;
    } else {
      return (world.totalTime % world.rawTime + world.relativeTime) % 24000;
    }
  }
  return 0;
}
**********************************************************************
### utils.time( world ) function

Returns the timeofday (in minecraft ticks) for the given world. This function is necessary because
canarymod and bukkit differ in how the timeofday is calculated. 

See http://minecraft.gamepedia.com/Day-night_cycle#Conversions
*