- q is converted to Time and global Format(const Time&) is called.
However, this "standard" Format is a little but misleading in this case, as what you will really need is Format just for one type (Time). So it might more likely look like this:
Value MyTimeConvert::Format(const Value& q) const {
Time tm = q;
return ::Format("%d:%d:%d", tm.hour, tm.minute, tm.second);
}
Note that this Convert would crash (or fail the assert in debug mode) if Value non-convertible to Time is passed, but that is OK in this case (you are going to use it just for Time anyway).