Today (today)
Description
Returns the start time of the current day considering your current time zone. Optionally, you can add a timezone different than your current one. In this case, you will get the time that your time zone presents when the day starts in the specified time zone.
Real-time queries
This operation is calculated when the query is executed and the result remains the same as time passes unless the query is re-launched for whatever reason (query error, server restart, etc.).
How does it work in the search window?
Select Create field in the search window toolbar, then select the Today operation.
This operation can be applied with no arguments. In this case, you will get the start time of the current day considering your current time zone. If you add the Time zone argument, you can specify a timezone different than your current one to see the time your time zone presents when the day starts in the specified time zone. When assigning a time zone different to yours, pay special attention to the original timestamp of the event, as the result may imply a day shift in the time zone specified.Â
Argument | Data type | Description |
---|---|---|
Time zone mandatory | string | You need a valid string format the app can recognize so it returns meaningful results. If you leave the field empty or introduce a value the app cannot recognize, the default Time Zone is UTC. You can use one of the following methods:
Be aware that some of the codes coincide, as CST could mean Central Standard Time or China Standard Time. In that case, it would be advisable to avoid using codes and introduce any of the other formats mentioned. |
The data type of the new field values is timestamp.Â
Be aware that in some time zones they set the clock forward during summer and thus the results will be altered. For example, Europe/Madrid (CET-Central European Time), which is UTC+1, becomes UTC+2 during summertime. Performing this operation during summer with that time zone selected as your own or using it as an argument will affect the results. Be also aware that summertime differs between the Northern and Southern Hemispheres.
Example
In the siem.logtrust.web.activity
 table, we want to create a field showing the start time of the current day (April 24th) taking as reference the EEST (Eastern European Summer Time, UTC+3) and considering we are in CEST (Central European Summer Time, UTC+2). To do this, we will create a new field using the Today operation.
The arguments needed to create the new field are:
Time zone - click the pencil icon and write EEST
Click Create field and you will see the following result:
The new field shows that when the current day (April 24th) started in EEST (UTC+3), it was 23 hours of April 23rd in CEST (UTC+2).
How does it work in LINQ?
Use the operator select
... as
... and add the operation syntax to create the new field. These are the valid formats for the Today operation:
today()
 → Use this expression to get the start time of the current day, according to your current time zone.today(timezone_string)
 →  Use this expression to get the start time of the current day, according to the specified time zone.
Example
You can copy the following LINQ script and try the above example on the siem.logtrust.web.activity
table.
from siem.logtrust.web.activity
select today("EEST") as today_start_EEST