File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/time/src/mcp_server_time Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class TimeTools(str, Enum):
22
22
class TimeResult (BaseModel ):
23
23
timezone : str
24
24
datetime : str
25
+ day_of_week : str
25
26
is_dst : bool
26
27
27
28
@@ -64,6 +65,7 @@ def get_current_time(self, timezone_name: str) -> TimeResult:
64
65
return TimeResult (
65
66
timezone = timezone_name ,
66
67
datetime = current_time .isoformat (timespec = "seconds" ),
68
+ day_of_week = current_time .strftime ("%A" ),
67
69
is_dst = bool (current_time .dst ()),
68
70
)
69
71
@@ -104,11 +106,13 @@ def convert_time(
104
106
source = TimeResult (
105
107
timezone = source_tz ,
106
108
datetime = source_time .isoformat (timespec = "seconds" ),
109
+ day_of_week = source_time .strftime ("%A" ),
107
110
is_dst = bool (source_time .dst ()),
108
111
),
109
112
target = TimeResult (
110
113
timezone = target_tz ,
111
114
datetime = target_time .isoformat (timespec = "seconds" ),
115
+ day_of_week = target_time .strftime ("%A" ),
112
116
is_dst = bool (target_time .dst ()),
113
117
),
114
118
time_difference = time_diff_str ,
You can’t perform that action at this time.
0 commit comments