Return the clock emoji closest to the current time when run I can have a large if/else condition for each 30 minutes but I'm looking for more math and Unicode based solution.

Here are clock emojis:
. If you lack proper rendering support, you can see them below (they're not in the same order and they may look different to what you see) or at the Unicode chart, page 4. They correspond to Unicode codepoints U+1F550 (CLOCK FACE ONE OCLOCK) through U+1F567 (CLOCK FACE TWELVE-THIRTY).

Your challenge is to write a program that outputs to STDOUT the closest clock face emoji to the current system time (AM and PM should be treated the same). For example if the time t is [5:15 &lt; t &lt; 5:45), you would display the 5:30 emoji .

This is code-golf, so shortest code in bytes wins. You may want to include a way to easily specify the time to test your code.

Edge test cases

Time   Output  Written
----------------------
11:48         12:00
3:15          3:30
9:45          10:00
Ruby — 61 54 bytes
Python 3 — 79 77 75 74 bytes
edit: Turns out this is much shorter in Ruby, because Time doesn't need to be imported and integer division is the default.
a=(Time.now.to_i/900-3)/2%24
puts&quot;&quot;&lt;&lt;128336+a/2+a%2*12

Arithmetic:

Time.now.to_i: Seconds since epoch.
/900: Combine time into 15-minute segments.
-3: -4 because characters start at 1 o'clock, +1 so that rounding is done to nearest half hour, rather than downwards.
/2: Combine into half-hour segments.
%24: Get current half-hour segment out of 12 hours.
a/2 + a%2*12: Account for the fact that whole-hour characters come in a block before half-hour characters.

Local time version, 69 bytes:
n=Time.now
a=((n.to_i+n.gmtoff)/900-3)/2%24
puts&quot;&quot;&lt;&lt;128336+a/2+a%2*12

Original Python 3 version:
import time
a=int((time.time()/900-3)/2%24)
print(chr(128336+a//2+a%2*12))

Prints the current time UTC. Python 2's chr only accepts 0-255, and unichr only 0-65535. In Python 3, / is always floating-point division and // is always integer division.