Private
Protection
Special Offers
Catalog
Auto donation
The next siege date is stored in the server database as a timestamp. Here is where to find it, how to turn it into a readable date and how to move a siege safely.
In L2J-family server packs siege dates are kept in the castle table, one row per castle. The siegeDate field holds the date and time of the next siege as a Unix timestamp in milliseconds, that is, the number of milliseconds since January 1, 1970 UTC.
For example, 1238252400000 means March 28, 2009, 15:00 UTC.
siege_date) and may store the time in seconds. Look at the length of the number: 13 digits means milliseconds, 10 digits means seconds. In the second case, drop the multiplication and division by 1000 in the examples below.Connect to the database with Navicat, HeidiSQL or the command-line client and run this query. It shows both the raw number and a readable date:
SELECT id, name, siegeDate,
FROM_UNIXTIME(siegeDate / 1000) AS siege_time
FROM castle;FROM_UNIXTIME shows the time in the database server's time zone. You can check that zone with SELECT @@time_zone, @@system_time_zone, NOW();. It should match the time zone of the game server.
castle table (the first command below) so you can roll back if something goes wrong.UPDATE queries: shift the date by a number of days or set an exact date.mysqldump -u root -p l2jdb castle > castle_backup.sql-- move the Aden siege 7 days forward
UPDATE castle
SET siegeDate = siegeDate + 7 * 24 * 60 * 60 * 1000
WHERE name = 'Aden';
-- set an exact date and time (in the database server's time zone)
UPDATE castle
SET siegeDate = UNIX_TIMESTAMP('2026-12-06 18:00:00') * 1000
WHERE name = 'Aden';The shift is 7 days x 24 hours x 60 minutes x 60 seconds x 1000 = 604,800,000 milliseconds. To move a siege back, subtract this number instead. Replace l2jdb with your database name, and check the castle names in the name field with the first query (you can also filter by id).
# date -> milliseconds (in the system time zone)
date -d '2026-12-06 18:00' +%s000
# milliseconds -> date
date -d @$((1238252400000 / 1000))//siege, //startsiege and //endsiege (see the GM command list).Before editing the database by hand, it is a good idea to have a fresh dump. Backups are covered in the guide on rescuing a MySQL database.
Published 9 September 2026
We help with the server pack, setup, protection and launch — one-off or on an ongoing basis.
Get L2‑Scripts news by email
And 5% off all studio services while you stay subscribed.
The discount is valid while you are subscribed: when ordering, tell the manager your subscription address on Telegram.
Search
News