X2 drops the voltage--it has impedance \$X_C = \frac{1}{2 \pi f C}\$. R in series limits the peak current. R2 in parallel bleeds the voltage off the capacitor so you don't get a jolt if you touch the pins after it is unplugged.
The zener limits it to the 48V or thereabouts when the relay is off. Probably the relay limits the voltage when it is on.
The 1.4V battery may be a button cell that is a primary cell (not rechargeable) just to power the timekeeping chip. If not it could be trickle charged through a resistor.
Your transistor is swapped E-C (now fixed in the edited version).
The chip does not drive the transistor, that would take power from the battery. Instead it sinks current out of the base to keep the transistor "off", so the power is drawn from the mains.
The lack of isolation is not critical because every part of the circuit that could come into contact with the user is insulated to a high standard (or should be if it's approved). For example, you probably have to remove the power in order to access the battery. Please do not compromise that protection with your experiments, contacting the battery connections with mains attached, for example, could result in a potentially fatal shock.