Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local time detect #48

Open
pekhenka opened this issue Jan 7, 2025 · 1 comment
Open

Local time detect #48

pekhenka opened this issue Jan 7, 2025 · 1 comment

Comments

@pekhenka
Copy link

pekhenka commented Jan 7, 2025

Hello!
image
I have problem, that ip based time is okay, but local time always Asia. Someone know how to fix?

@Allamaris0
Copy link

I know how you can change it.
Find folders where are saved your workers. For me is in AppData VirtualBrowser\Workers. Choose worker, what you want to run. Find a file "virtual.dat". There is all configuration for a worker. Open with some text editor. Find all "Asia/Nicosia" and change for a timezone, what you want.
Then run with playwright:

const { chromium } = require('playwright')

;(async () => {
  // worker-id 需要先手动创建
  const workerId = your worker id

  const browser = await chromium.launchPersistentContext(
    `your path to workers folder\\${workerId}`,
    {
      // Adjust to your path
      executablePath: 'C:\\Program Files\\VirtualBrowser\\VirtualBrowser\\126.0.6478.127\\VirtualBrowser.exe',
      args: [`--worker-id=${workerId}`],
      headless: false,
      defaultViewport: null,
    }
  )

  const page = await browser.newPage()
  await page.goto('http://browserscan.net')

  await new Promise(resolve => setTimeout(resolve, 60000));

})()

It's no perfect solution, I know xD You can't run with VirtualBrowser gui, because when you click "Launch" it overwrites "virtual.dat". I haven't still figured out, how to change timezone choice in Virtual Browser code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants